04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

lock and inline elements<br />

The real truth behind the and mystery<br />

Okay, it’s time to stop the charade: and are actually different<br />

types of elements. The element is a block element and the <br />

element is an inline element. What’s the difference? Block elements are always<br />

displayed as if they have a linebreak before and after them, while inline elements<br />

appear “in line” <strong>with</strong>in the flow of the text in your page.<br />

Block: stands on its own Inline: goes <strong>with</strong> the flow<br />

, , ..., , , and are all block elements.<br />

h2<br />

p<br />

blockquote<br />

94 Chapter 3<br />

Each block element is<br />

displayed on its own, as if<br />

it has a linebreak before<br />

and after it.<br />

Block elements<br />

separate content<br />

into blocks.<br />

, , and are inline elements.<br />

on the other<br />

hand, like all inline<br />

elements, is just<br />

displayed in the flow<br />

of the paragraph<br />

it’s in.<br />

Remember: block elements stand on their own;<br />

inline elements go <strong>with</strong> the f low.<br />

p<br />

q

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!