Div and span: Difference between revisions

Content deleted Content added
See also: removed link to a redirect source for this page
rm self-redirect
Line 1:
In [[HTML]] and [[XHTML]], '''<code>span</code>''' and '''[[Div (HTML tag)|<code>div</code>]]''' [[HTML element|tags]] are used to describe content that cannot be properly described by other, more [[semantic]] tags.
 
Proper semantic [[markup language|markup]] requires that all elements describe the type of data contained within. For example, in HTML and XHTML, a <code>p</code> (paragraph) element should contain a paragraph of text, and an <code>h1</code> element should contain the highest-level header of the page. In HTML and XHTML, <code>span</code> and <code>div</code> are the only elements that carry no innate semantic meaning, besides the logical grouping of the enclosed elements.