O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Block Elements

You might have noticed the property-value pair display: block in the rules in ch09_02.css:

TITLE {display: block; font-size: 24pt; font-weight: bold; 
text-align: center; text-decoration: underline}
AUTHOR {display: block; font-size: 18pt; font-weight: bold;
text-align: center}
SECTION {display: block; font-size: 16pt; font-weight: bold;
text-align: center; font-style: italic}
P {display: block; margin-top: 10}

In particular, display: block specifies that the element in question get its own block, which means that these elements start on a new line and that the element following them starts on a new line as well. That is, you use display: block to create block-level elements.

The display property is more important in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required