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>

Link to HTML Dog Link To Us! If you've found HTML Dog useful, please consider linking to us.

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