Formatting Using CSS

Lesson 1

The basics of getting the document to look the way you want

Note that the Headings have a particular color, size and alignment. The paragraph text uses the default font and color and alignment of the document, and its own particular font size, 18 pt. A paragraph can have any amount of text in it, and normally it will wrap around in the way that the browser determines, based on the window size. It's possible to specify different margins, paddings, etc., in the CSS file, but if that isn't done, the margins and wrapping are determined by the browser.

In the CSS file a particular class of paragraph has also been defined that is center-aligned and uses a slightly smaller font size, like this.

By default Paragraphs use the style defined in the CSS: the default style traits that are defined for the whole document, plus whatever additional traits are defined for the Paragraph element. You can still give individual words italicization or make them bold. In this case, in the CSS file the definition of emphasis includes both italicization and bold weighting.


Christopher Dobrian dobrian@uci.edu