CSS box model: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit
Tags: Mobile edit Mobile web edit
Line 23:
The Cascading Style Sheets (CSS) specification describes how elements of [[web page]]s are displayed by graphical browsers. Section 4 of the CSS1 specification defines a "formatting model" that gives block-level elements—such as <code>p</code> and <code>blockquote</code>—a width and height, and three levels of boxes surrounding it: padding, borders, and margins.<ref name="CSS-19990111">{{cite web |url=https://www.w3.org/TR/1999/REC-CSS1-19990111#formatting-model |title=Cascading Style Sheets, level 1 § Formatting model |last1=Wium Lie |first1=Håkon |author-link1=Håkon Wium Lie |last2=Bos |first2=Bert |author-link2=Bert Bos |date=11 January 1999 |publisher=[[World Wide Web Consortium]] |access-date=26 October 2017}}</ref> While the specification never uses the term "[[CSS box model|box model]]" explicitly, the term has become widely used by web developers and web browser vendors.
 
All HTML elements can be considerconsidered "boxes", this includeincludes <code>div</code> tag, <code>p</code> tag, or <code>a</code> tag. Each of those boxes has five modifiable dimensions:
 
:*the <code>height</code> and <code>width</code> describe dimensions of the actual content of the box (text, images, ...)