Understanding the Box Model - HTML CSS CSS

HTML CSS examples for CSS:Introduction

Introduction

If an element is visible, it will occupy a rectangular region of the page. This is known as the element's box.

There are four parts to this box. Two of the parts can be visible: the contents and the border.

Padding is the amount of space between the content and the border.

Margin is the space between the border and the other elements.

An element can contain other elements.

In this case, the parent element's context box is known as the child element's container block.

From:The Definitive Guide to HTML5


Related Tutorials