block-level elements

Block-level elements are those elements of the source document that are formatted visually as blocks (e.g., paragraphs). They begin on new lines. Several values of the 'display' property make an element block-level.

Remember that the sum of the seven properties is always equal to the 'width' of the parent element. So here, the browser assigns to the left margin a value that will make the sum of the seven equal to the parent's width.

Style the pink box with:

	width: auto;

Try These

Watch This

aqua
yellow
pink

Check This

<div id="aqua">aqua</div> <div id="yellow">yellow</div> <div id="pink">pink</div>

Edit This

Use shift + enter to create new lines (even in Safari and Chrome).