22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11: Getting Creative with Colors and Fonts<br />

To format all first-level headings to use the Verdana font, use a style declaration<br />

like this:<br />

h1 {font-family: Verdana, Helvetica, sans-serif;}<br />

In the preceding declaration, two more font families appear in case someone’s<br />

browser doesn’t support the Verdana font family.<br />

We recommend including these font families in your style declarations:<br />

✓ Common: At least one of these common font families:<br />

• Arial: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Helvetica: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Times New Roman: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Verdana: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

✓ Generic: At least one of these generic font families:<br />

• Serif: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Sans serif: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Cursive: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Fantasy: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

• Monospace: ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

Different elements may be formatted using different font families. These rules<br />

define a different font family for hyperlinks (see Figure 11-1):<br />

body {color: #808000; font-family: Arial, sans-serif; font-size: 85%;}<br />

hr {text-align: center;}<br />

a {font-family: Courier, “Courier New”, monospace;}<br />

177

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

Saved successfully!

Ooh no, something went wrong!