Sabtu, 13 Desember 2008

Web Page Format

All HTML documents (web pages) should use this basic format as the foundation on which to build the page. This format is accomplished with four sets of tags, they are:

<html> and </html>
<head> and </head>
<title> and </title>
<body> and </body>

The </html> tag tells your browser the page is an HTML document. The </html> tag should be the very first tag in your HTML document. The </html> tag is the last tag in your HTML document.
The </head> tags contain the page title tags,META tags which are the tags a search engine uses to index your page, any HTML base tags, and some javascript codes. For right now don't concern yourself with the META tags, HTML base tags, and javascript codes, we will discuss them later. You can build a web page without them, and add them later as you become comfortable with the HTML language.

The </title> tags are placed inside the </head> tags, and contain the title of the page as it appears in the status bar at the lower left-hand corner of the screen. This title does not appear on your web page. This title should be descriptive of your page, but not more than 64 characters in length.

The </body> tags are where you place all the content (text, images, and links) that you want to appear on your page. The opening body tag is where you also specify the background color, text color, link and vlink colors.

Below is an example of how they should be arranged. I have included a set of basic META tags in the head tag section, and the basic attributes within the opening body tag. You can Copy&Paste this code into a text editor when you get ready to start your page.

<title>Your Page Title Here</title>
<META name="description" content="Description of your page or site">
<META name="keywords" content="Key words related to your site go here">
<base href="">
<body bgcolor="color" text="color" link="color" vlink="color">
All your page content goes here..!


Many opening HTML tags allow to to insert what are called "attributes". These attributes are another means of formatting your web page. Lets use the body tag from the code above to explain these attributes.

<body bgcolor="color" text="color" link="color" vlink="color">
If we do not use these attributes our web page would appear with the default colors. By replacing the word "color" with the name of a color, or a hexadecimal number, we can change the default colors.

<body bgcolor="black" text="white" link="gold" vlink="purple">
The above body tag will give us a page with a black background, white text, gold links, and purple visited links. Lets assume you have a pretty ivory background you would like to use, with black text, blue links, and red visited links. The background="" attribute will accomplish this. Here is how the code would look.

<body bgcolor="ivory" text="black" link="blue" vlink="red" background="">

Note: we still specified a bgcolor (pick one as close as possible to match your background) so the page doesn't open with the default bgcolor while your background image loads. Also, if you place the in the <base href=""> in the head section you can shorten the url in your background attribute to look like this.


0 komentar:

Posting Komentar