HTML and CSS Reference
In-Depth Information
tags, and all the other strange bugs that always seem to creep into an HTML file the first
time you create it. These problems always seem to happen no matter how good you are
at creating web pages. If you use an HTML editor or some other help tool, your job will
be easier, but you'll always seem to find mistakes. That's what previewing is for—so you
can catch the problems before you actually make the document available to other people.
Getting Fancy Everything included on the page up to this point has been plain-
vanilla HTML 2.0, so it's readable and will look pretty much the same in all browsers.
After you get the page to this point, however, you can add additional formatting tags and
attributes that won't change the page for many readers but might make it look a little
fancier in browsers that do support these attributes.
So, what attributes do you want to use? Here are two:
Centering the title of the page, the quote, and the bookstore's address
Making a slight font size change to the address
To center the topmost part of the page, you can use the <div> tag around the heading, the
quote, and the bookshop's address, as in the following:
<div style=”text-align: center”>
<a name=”top”><h1 style=”font-variant: small-caps”> The Bookworm: A Better Book
Store </h1></a>
“Old books are best—-how tale and rhyme <br />
Float with us down the stream of time!” <br />
- Clarence Urmy, <cite> Old Songs are Best </cite>
<p> The Bookworm Bookshop <br />
1345 Applewood Dr <br />
Springfield, CA 94325 <br />
(415) 555-0034
I've also used the style attribute to change the text in the <h1> tag to small caps. To
change the font size of the address, add a style attribute to the paragraph containing the
Search WWH ::

Custom Search