HTML Tag: Div | HTML Dog

You are here: Home → References → HTML → Tags →

div is often frowned upon. Poor div. But div just isn’t all that meaningful. div is a nihilist. In the HTML5 school, the happy-skippy likes of article, section, and nav are top of the class. These sectioning elements apply more meaning to an HTML document. So when it’s relevant to use them, use them. And have a gold star.

For smaller chunks of text or inline HTML, span, an equally meaning-free element, can be used.

Optional Attributes

Global attributes

Example

<div id="meaningless"> <p>Am I individual?</p> <p>Am I rebellious?</p> <p>I am a nihilist.</p> </div>

Advertise Here! On a long-established, well-read, well-respected web development resource.

Main menu

  • Tutorials
    • HTML
    • CSS
    • JavaScript
  • Techniques
  • Examples
  • References
    • HTML
      • Tags
      • Attributes
      • Characters
    • CSS
      • Properties
      • Selectors
      • Values

Supplemental menu

  • About Us
  • Contact Us
  • Link to Us
  • Advertise With Us
  • Web Hosting
  • Site Map
  • Home
Search ↑ Top

Từ khóa » Html5 Tag Div