22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & 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.

88<br />

Part III: Taking Precise Control Over Web Pages and Styles<br />

The value of the font property is a list of any values that correspond to the<br />

various font properties:<br />

✓ The following values must be defined in the following order although<br />

they don’t have to be consecutive:<br />

• font-size (required)<br />

• line-height (optional)<br />

• font-family (required)<br />

The font-family value list must end with a semicolon.<br />

Use commas to separate multiple font family names. For example, you<br />

can use the following style declaration to create a specific style for paragraph<br />

text that specifies font-size, line-height, and font-family in that<br />

(required) order:<br />

p {font: 1.5em bold 150% Arial, Helvetica, sans-serif;}<br />

✓ The following values are optional and may occur in any order within the<br />

declaration. Individual values are separated by spaces:<br />

• font-style<br />

• font-variant<br />

• font-weight<br />

For example, you can use the following style declaration to create a specific<br />

style for a first-level heading that mixes the optional values in among the<br />

required ones (font-style and font-weight before line-height and font-family in<br />

this case, with font-size and font-variant omitted):<br />

h1 {font: italic bold 150% Arial, Helvetica, sans-serif;}

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

Saved successfully!

Ooh no, something went wrong!