Web page structure
| This is the basic structure of a web page, notice it starts with a <html> tag and ends with </html>. |
<html>
<head>
<title> </title>
</head>
<body>
</body>
</html>
|
(document header)
The HEAD tag defines an HTML document header. The header contains information about the document rather than information to be displayed in the document. The web browser displays none of the information in the header, except for text contained by the TITLE tag. You should put all header information between the <HEAD> and </HEAD> tags, which should precede the BODY tag.
The HEAD tag can contain TITLE, BASE, ISINDEX, META, SCRIPT, STYLE, and LINK tags.
Syntax
<HEAD>...</HEAD>>
Example
<HEAD>
<TITLE> Basic web page structure</TITLE>
<BASE HREF="http://www.mozilla.com">
</HEAD>
BODY
(main content of document)
The BODY tag specifies the main content of a document. You should put all content that is to appear in the web page between the <BODY> and </BODY> tags.
The BODY tag has attributes that let you specify characteristics for the document. You can specify the background color or an image to use as a tiled background for the window in which the document is displayed. You can specify the default text color, active link color, unvisited link color, and visited link color. You can specify actions to occur when the document finishes loading or is unloaded, and when the window in which the document is displayed receives or loses focus.
Syntax
<BODY
BACKGROUND="
bgURL"
BGCOLOR="
color"
TEXT="
color"
LINK="
color"
ALINK="
color"
VLINK="
color"
BACKGROUND="bgURL"
specifies an image to display in the background of the
document. The URL value can be an absolute URL (for example,
"http://www.yourcompany.com/images/image1.html") or a relative
URL (for example, "images/image1.gif"). The image is tiled, which means it
is repeated in a grid to fill the entire window or frame where the document is
displayed.
BGCOLOR="color" sets the color of the background.
TEXT="color" sets the color of normal text (that is, text that is not in a link) in the
document.
LINK="color" sets the default text color of unvisited links in the document. An
unvisited link is a link that has not been clicked on (or followed)..
ALINK="color" specifies the color to which links briefly change when clicked. After
flashing the ALINK color, visited links change to the VLINK color if it has been
specified; otherwise they change to the browser's default visited link color.
VLINK="color" specifies the text color of visited (followed) links in a document.
Now lets look at Inserting images into web documents