All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Box model?

Definition 31.7 Primary & Middle School Computer Science · Chapter 31 — Web Pages: HTML and CSS

In the box model, the browser draws every element as a rectangle: its content, surrounded by an inner space, the padding; then a border; then an outer space, the margin, that keeps other boxes away.

The box of a paragraph with style.css: the content, the padding, the border (blue) and the margin, to scale.
The box of a paragraph with style.css: the content, the padding, the border (blue) and the margin, to scale.
The top of the same HTML page with the two style sheets: only the CSS changed.
The top of the same HTML page with the two style sheets: only the CSS changed.
Read in context →