Division. Defines a block of HTML. Commonly used to apply CSS to a chunk of a page. The <div> tag is used to group block-elements to format them with CSS. The difference between the <div> tag and the <span> tag is that the <div> tag is used with block-level elements whilst the <span> tag is used with inline elements.

Required Attributes

  • None.

Optional Attributes

Example

<div id="navigation">
	[stuff]
</div>
<div id="content">
	[stuff]
</div>

Changes in HTML5

  • The align attribute not supported in HTML5.

Related Tags