basics of website design banner photo

HTML

HTML 5

CSS 2.1

CSS 3

Reference

HTML <div> Element.

The <div> element defines a section in the body of a page and is an element which makes it easier to add structure to the layout of web pages. <div> elements are designated as 'block-level' and as such are displayed with a line break before and after.

<div> elements can contain other 'block' or 'inline' elements and allow web designers to group together these elements with the purpose of applying common styles to show a relationship between the elements within the div and also to divide the content in the body of a page into a series of sections.

By adding a class or id attribute the div can then be accessed from a style sheet to add backgrounds, change alignment, font properties, colours or anything else that can be styled using CSS.

HTML 4 Element List