What is CSS Box Model and what are its elements?

devquora
devquora

Posted On: Feb 22, 2018

 

The CSS box defines the design and the layout of elements of CSS. The several elements are:

Margin: transparent area outside border
Border: the padding and content option with a border around it is shown.
Padding: Space is around content. Padding is transparent.
Content: box where text and images appear.
e.g.:

 
div{
	width: 300px;
	border: 25px solid  yellow;
	padding: 25px;
	margin:  25px;
}

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    CSS Interview Questions

    What is CSS?

    Cascading style sheets or CSS is a web designing language simple for HTML elements. The application is commonly known a..

    CSS Interview Questions

    What are the advantages of CSS?

    There are a number of advantages of CSS, It gives lots of flexibility for setting the properties of the element Easy ma..

    CSS Interview Questions

    In how many ways can a CSS be integrated as a web page?

    CSS can be integrated in three ways: Inline: term is used when the CSS code have attribute of HTML elements<p styl..