HTML DIV Tag

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

The html div element is used to divide a page into sections. Divisions are usually used together with other block-level elements to layout pages.

HTML div example

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.

<body>
    <div id="Basement">
    </div>
</body>

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

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.