| Adding Style | | Print | |
rather gray place filled with drab pages like this one. While the Web was originally conceived to transmit
scientific research documents (so that existing research could reach wider audiences), it did not take long
for people to find other uses for it. No one can question that the speed with which the Web has grown is
phenomenal, and it did not take long for people to start creatingWeb pages for all different kinds of
purposes—from individuals setting up homepages about their family or hobbies to big corporations
setting up vast sites that highlighted their products and services.
As the Web grew, people who were building these pages wanted more control over how their pages
appeared. In order for this to happen, the W3C (which stands for World Wide Web Consortium, the body
responsible for creating the HTML specifications), and the people writing theWeb browsers (in particular
Netscape and Microsoft) introduced new markup. Soon there was markup allowing you to specify
different fonts, colors, backgrounds, and so on. It was in catering to these new requirements of the Web
that new versions of HTML were spawned.
Consider the possibilities: You could take the first briefWeb page from earlier in the chapter, specify the
typeface (or font) you want the page to use, change the color of the text in the main paragraph to red, and
indicate that some of the text should be in a bold or italic font. The whole of the page could also have a
very light gray background,
This page is still not going to be a hot contender for any design awards, but it shows that you do have
control over how the page looks. The typeface has been specified, the paragraph is in red text (which you
can’t see from the black and white figure), and it also features bold and italic text.
Here is the code for this example (eg01_eg02.htm):
<html>
<head>
<title>Acme Toy Company: About Us</title>
</head>
<body bgcolor="#EFEFEF">
<font face="arial">
<h1>About Acme Toys Inc.</h1>
</font>
<font face="arial" color="#CC0000">
<p><b>Acme Toys</b> has been making toys for popular cartoon
characters for over 50 years. One of our most popular customers
was <i>Wile E. Coyote</i>, who regularly purchased our items to help
him catch Road Runner.</p>
</font>
</body>
</html>
First you should note how parts of the text in the paragraph are in bold and italic typefaces. The <b>
element is used to indicate the parts of the text that should be in a bold typeface, and an <i> element is
used to indicate which parts should be in italics.
The most obvious changes to this page, however, are the <font> elements, which specify that the page
should be displayed in an Arial typeface. If the book were in color you would also notice that the
paragraph text is in red.
This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment.
| Users' Comments (0) |
|
No comment posted






