HTML 5 <div> tag
Definition and Usage
The <div> tag defines a division/section in a document.
Differences Between HTML 4.01 and HTML 5
The "align" attribute which was
deprecated in HTML 4.01, is
not supported in HTML 5. Use CSS instead.
Tips and Notes
Note: Browsers usually place a line break before and after the div
Tip: Use the <div> tag to group block-elements to format them
This is some text
<h4>This is a header in a div section</h4>
<p>This is a paragraph in a div section</p>
|This is some text
This is a header in a div section
This is a paragraph in a div section
- 4: indicates if the attribute is defined in HTML 4.01
- 5: indicates if the attribute is defined in HTML 5
|How to align the text in the div element. Not supprted. Use styles instead.
|class, contenteditable, contextmenu, dir, draggable, id,
irrelevant, lang, ref, registrationmark, tabindex, template, title
For a full description, go to Standard
Attributes in HTML 5.
|onabort, onbeforeunload, onblur, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress,
onkeyup, onload, onmessage, onmousedown, onmousemove,
onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect,
For a full description, go to Event Attributes
in HTML 5.
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
Try before you buy with a free fully functional 30-day trial
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).