Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is a div called a div? Why is a span called a span?

Tags:

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?

like image 614
KthProg Avatar asked Jun 16 '15 23:06

KthProg


People also ask

What is a div or span called?

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.

What is called div?

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.

What does span stand for in HTML?

<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 .

What is a span for?

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.


1 Answers

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)

like image 172
zessx Avatar answered Oct 05 '22 14:10

zessx