Creating Professional Webpages

10:06:00 AM |



Separating Heads from Bodies
Whenever you write a Web page in HTML, the whole of the page is contained between the opening
<html> and closing </html> tags, just as it was in the last example. Inside the <html> element, there
are two main parts to the page:
❑ The <head> element: Often referred to as the head of the page, this contains information about
the page (this is not the main content of the page). It is information such as a title and a
description of the page, or keywords that search engines can use to index the page. It consists of
the opening <head> tag, the closing </head> tag, and everything in between.
❑ The <body> element: Often referred to as the body of the page, this contains the information
you actually see in the main browser window. It consists of the opening <body> tag, closing
</body> tag, and everything in between.
Inside the <head> element of the first example page you can see a <title> element:
<head>
<title>Acme Toy Company: About Us</title>
</head>
Between the opening and closing title tags are the words Acme Toy Company: About Us, which is the
title of this Web page. If you remember Figure 1-2, which showed the screenshot of this page, I brought
your attention to the words right at the top of the browser in the center. This is where Internet Explorer
(IE) displays the title of a document; it is also the name IE uses when you save a page in your favorites.
The real content of your page is held in the <body> element, which is what you want users to read, and is
shown in the main browser window.
The head element contains information about the document, which is not displayed
within the main page itself. The body element holds the actual content of the page
that is viewed in your browser.
Adding Style
The first example page isn’t going to win any awards for design. Indeed, when theWeb started it was a
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 WorldWide 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, in which case it would look something like Figure 1-4.



1 comments:

marvin mondejar said...

You got a nice blog but you also have big fonts, can you reduce it as what you have posted about web pages?