home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeWeb Design in a NutshellSearch this book

Chapter 9. Structural HTML Tags

This chapter looks at the subset of HTML tags that is used primarily to give the document structure. It also discusses tags that are used for providing information about the document and those used for controlling its appearance or function on a global level.

9.1. Summary of Structural Tags

In this section, browser support for each tag is noted to the right of the tag name. Browsers that do not support the tag are grayed out. Tag usage is indicated below the tag name. Start and end tags are required unless otherwise noted. "Deprecated" means that the tag or attribute is currently supported but is due to be phased out of the HTML specification and is discouraged from use (usually in favor of similar style sheet controls). The attributes listed for each tag reflect those in common use. A more thorough listing of attributes for each tag, according to the HTML 4.01 specification, appears in Appendix A, "HTML Elements".

<body>NN 2, 3, 4, 6 MSIE 2, 3, 4, 5, 5.5, 6 HTML 4.01 WebTV Opera5

<body>...</body> (start and end tags optional)

Defines the beginning and the end of the document body. The body contains the content of the document (the part that is displayed in the browser window). Attributes to the <body> tag affect the entire document.

Attributes

alink="#rrggbb" or color name

Deprecated. Sets the color of active links (i.e., the color while the mouse button is held down during a "click"). Color is specified in hexadecimal RGB values or by standard web color name. Chapter 16, "Specifying Color in HTML" explains these color specification methods.

background=url

Deprecated. Provides the URL to a graphic file to be used as a tiling graphic in the background of the document.

bgcolor="#rrggbb" or color name

Deprecated. Sets the color of the background for the document. Color is specified in hexadecimal RGB values or by standard web color name.

link="#rrggbb" or color name

Deprecated. Sets the default color for all the links in the document. Color is specified in hexadecimal RGB values or by standard web color name.

text="#rrggbb" or color name

Deprecated. Sets the default color for all the non-hyperlink and unstyled text in the document. Color is specified in hexadecimal RGB values or by standard web color name.

vlink="#rrggbb" or color name

Deprecated. Sets the color of the visited links (links that have already been followed) for the document. Color is specified in hexadecimal RGB values or by standard web color name.

Netscape Navigator 4.0+ only

marginwidth=number

Specifies the distance (in number of pixels) between the left and right browser edges and the text and graphics in the window.

marginheight=number

Specifies the distance (in number of pixels) between the top and bottom edges of the browser and the text or graphics in the window.

Internet Explorer only

bgproperties=fixed

When this attribute is set to fixed, the background image does not scroll with the document content.

leftmargin=number

Specifies the distance (in number of pixels) between the left browser edge and the beginning of the text and graphics in the window.

topmargin=number

Specifies the distance (in number of pixels) between the top edge of the browser and the top edge of the text or graphics in the window.

rightmargin=number

Specifies the distance (in number of pixels) between the right edge of the browser and the text or graphics in the window.

bottommargin=number

Specifies the distance (in number of pixels) between the bottom edge of the browser and the bottom edge of the text or graphics in the window.

<head>NN 2, 3, 4, 6 MSIE 2, 3, 4, 5, 5.5, 6 HTML 4.01 WebTV Opera5

<head>...</head> (start and end tags optional)

Defines the head (also called "header") portion of the document that contains information about the document. The <head> tag has no directly displayed content, but serves only as a container for the other header tags, such as <base>, <meta>, and <title>.

Attributes

profile=URL

Provides the location of a predefined metadata profile that can be referenced by <meta> tags in the <head> of the document. This attribute is not yet implemented by browsers.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.











??????????????@Mail.ru