My assumption is that div means "divider" because it divides elements (due to the new line before and after), and that span is called span because it's inline, so it "spans" its content. Was it ever directly indicated where they came up with these names?
span represents an inline portion of a document, for example words within a sentence. div represents a block-level portion of a document such as a few paragraphs, or an image with its caption.
The <div> tag defines a division or a section in an HTML document. The <div> tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript. The <div> tag is easily styled by using the class or id attribute.
<span>: The Content Span element The <span> HTML element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang .
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute. The <span> tag is much like the <div> element, but <div> is a block-level element and <span> is an inline element.
According to HTML 3.2 reference <div>
stands for "document divisions".
<span>
simply comes from the related verb.
The physically written <span>
and </span>
tags span their content. One before, one after. They do nothing more, have no semantic use, no meaning, and are generics, which could explain such a name. For another example, it could have been <encompass>
.
(Nothing clear in HTML 4 refs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With