0

Please, can someone explain the <div> tag explicitly to me? Also, I want to know the difference between <div> and <span>.

9th Oct 2018, 1:53 PM
Ruth Ojo
Ruth Ojo - avatar
3 Respostas
+ 2
The difference between span and div is that a span element is in-line and usually used for a small chunk of HTML inside a line (such as inside a paragraph) whereas a div (division) element is block-line (which is basically equivalent to having a line-break before and after it) and used to group larger chunks of code. http://www.htmldog.com/guides/html/intermediate/spandiv/ div is a block element, span is inline. This means that to use them semantically, divs should be used to wrap sections of a document, while spans should be used to wrap small portions of text, images, etc. https://stackoverflow.com/questions/183532/what-is-the-difference-between-html-tags-div-and-span I recommend you to read the w3schools site to learn the basics of html, its really clear explained https://www.w3schools.com/html/html_blocks.asp
9th Oct 2018, 2:18 PM
Willem Roos
0
Willem Roos Thank you so much. I will visit the site
9th Oct 2018, 2:21 PM
Ruth Ojo
Ruth Ojo - avatar
0
I've visited the site and I totally understand now. Thank you so much.
9th Oct 2018, 2:31 PM
Ruth Ojo
Ruth Ojo - avatar