By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more


Reference on the HTML div Element. Includes useful Example, and background information.

Edited: 2016-01-18 06:00

The HTML div element should primarily be used in cases where there is no suitable element, but can also be used by web designers for layout purposes.

The new elements of HTML replaced a lot of the original uses for div. Therefor, before using the div element, consider if one of the following elements would be more appropriate: article, section, footer, and header.

Using appropriate elements, where they exist, should improve both the accessibility for users, and the maintainability for developers.


Note. There is an example of a 3-column layout, using a single division, and ordered lists instead of tables. See: Using Block Elements and Divisions Instead of Tables.

    <div id="Basement">

The above division, has a unique ID, which we may refer to in the CSS. Use classes for recurring divisions.