What is an Element?

Elements are the building blocks of web pages written in HTML. An element can be an image, a title, a text area, etc or a container for other elements.

We can refer to an element as a Box with a certain structure. This structure is called the Box Model. The Box Model is used in order to better understand and manipulate each element and be able to master positioning and proportion.

A Box Model is made up of sections:

Content can be text, images or other elements contained by the box. ( see Structure and Inheritance to see the connections between different elements).

Border surrounds the content of the element. You can add borders to elements, select their width, change their colors and add round corners.

Margin is the invisible area around the content and outside the borders.

Padding is the invisible area between the border and the content.