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.

86<br />

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

Syntax for changing capitalization<br />

This style declaration uses the text-transform property:<br />

selector {text-transform: value;}<br />

The value of the text-transform property may be one of the following:<br />

✓ capitalize: Capitalizes the first character in every word<br />

✓ uppercase: Renders all letters of the text of the specified element in<br />

uppercase<br />

✓ lowercase: Renders all letters of the text of the specified element in<br />

lowercase<br />

✓ none: Keeps the value of the inherited element<br />

Markup for changing capitalization<br />

The following example renders the first-level heading in uppercase (shown in<br />

Figure 11-7):<br />

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

a {font-weight: bold;}<br />

a:link {color: olive; text-decoration: underline;}<br />

a:visited {color: green; text-decoration: none;}<br />

h1 {font-family: “Trebuchet MS”, verdana, geneva, arial, helvetica, sansserif;<br />

font-size: 2em; line-height: 2.5em; color: teal; text-transform: uppercase;<br />

text-align: center}<br />

Figure 11-7: The first-level heading is rendered in all uppercase.

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

Saved successfully!

Ooh no, something went wrong!