Brilliant html and css

Page 152

M08_BRAN1529_01_SE_C08.QXD:BRILLIANT

30/1/09

10:45

Page 141

8

Formatting fonts and text using CSS What you’ll do

Introduction Fonts are fundamental to all written communication. Fonts convey emotion, style and help your writing convey implicit meaning. For instance, if you are chatting in a chat-room or emailing someone and you type USING ALL CAPS, a common Web convention is that you are yelling. A font’s meaning can be subtle. A choice as simple as using Comic Sans rather than Arial can convey an entirely different mood. Welcome to My Site (Comic Sans)

Set an element’s font-family Set an element’s font-style Set an element’s font-weight and size Setting an element’s font using the font declaration Decorate text and change case Align text

The Comic Sans font conveys a loose and informal site while Arial seems more formal. Welcome to My Site (Arial) The Lucida Blackletter font conveys something out of Bram Stoker’s Dracula. It is neither loose and informal, nor formal. It’s spooky. Welcome to My Site (Lucida Blackletter)

All three font choices give users entirely different expectation of a site’s content. I would expect a goth rock band to use Lucida Blackletter, but not an online banking firm. A goth band that used Arial for its site would seem rather boring; and I definitely would not bank on an online banking site that used Comic Sans. Different fonts are appropriate, depending upon the impression you want to give. Choose your site’s fonts carefully.

Formatting fonts and text using CSS 141


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.