Structuring Tags

or scroll down the page.

Return to Main Page of Ted’s HTML Tutorial

An HTML source code document typically contains certain “structuring” tags which make up the basic “skeleton” of the source code document.  Of the following HTML tags, although none of them are required, 1) the dark blue tags are strongly recommended, and 2) the light blue tags are optional (click on any tags to read more about them):

<HTML>
 
<HEAD>
   <TITLE>Document XYZ</TITLE>
<BASE>
<META>
</HEAD>

<BODY>

Text, Hyperlinks, Graphics, Animations, etc. </BODY>

</HTML>

You can gather information about the home page of a web site I created if you go here:  Web Page Example.

Here is what the non-empty HTML, HEAD, and BODY tag pairs are for:


Between the <HEAD> & </HEAD> tags, other non-empty and empty tags may be included:


The empty <BASE> tag may contain within it further parameters as part of the command:


A search engine (such as Google, Yahoo, AltaVista, Lycos, WebCrawler) searches the web to find pages which contain “keywords” specified by someone utilizing the search engine.  <META> tags, embedded in the source code of a web page, are elements that provide information to a search engine about that web page or web site when the search engine is looking for the “keywords” specified by a web user.  (The <META> tag information is not displayed on a browser while viewing the page.)  There are two main categories of <META> tags: 1) “name” tags (discussed next) and 2) “http-equiv” tags (discussed later).  Examples will be included.

The four most commonly used <META  NAME> tags are 1) author, 2) description, 3) keywords, and 4) robots (a separate <META> tag should be used for each):

Go to <META> tag list to see a list of the <META> tags included on the page you are viewing now.


When a web page is requested from a web server, the server first checks for the existence of the page.  If the page does exist, the server then sends a block of “HTTP headers” to the browser, followed by the requested page.  Here is an example of an “HTTP header block” retrieved by my browser for my homepage (located at http://www.tedmontgomery.com):

HTTP/1.0 200 OK
MIME-Version: 1.0
Date: Tue, 15 Feb 2000 15:30:20 GMT
Server: NaviServer/2.0 AOLserver/2.3.3
Content-Type: text/html
Content-Length: 11558
Last-Modified: Thu, 10 Feb 2000 10:55:35 GMT
Version: Thu, 10 Feb 2000 10:55:35 GMT
The block of HTTP headers contains information such as the current date and time, the type of web server it is, and other specifications.  Using the HTTP-EQUIV (“hypertext transfer protocol equivalent”) parameter in a <META> tag, the information in a header can be extended. Note:  The term “HTTP headers” should not be confused with HTML “header” tags (<HEAD> & </HEAD>).  They are not the same.

The two most commonly used <META  HTTP-EQUIV> tags are 1) expires and 2) refresh (a separate <META> tag should be used for each):

The following shows all the HTML tags (including the <META  HTTP-EQUIV="REFRESH"  CONTENT="time  URL=newpage.html"> tag) for the three pages of a brief slideshow.  (Note that the last page will return the browser to this page.)  Click on Slideshow to see the show in action (each picture will be displayed on your browser for 10 seconds).

Page 1 (page1.html):
<HTML>

<HEAD>
   <TITLE>Slideshow: Page 1</TITLE>
<META HTTP-EQUIV="REFRESH" CONTENT="10; URL=page2.html">
</HEAD>

<BODY TEXT="713D2D" BGCOLOR="#E1CD9D">
<CENTER>
<H1>Camel Rock near Tesuque, New Mexico</H1>
<IMG SRC="graphics/camelrck.jpg" WIDTH="340" HEIGHT="255" ALT="Camel Rock near Tesuque, NM">
</CENTER>
</BODY>

</HTML>


Page 2 (page2.html):
<HTML>

<HEAD>
   <TITLE>Slideshow: Page 2</TITLE>
<META HTTP-EQUIV="REFRESH" CONTENT="10; URL=page3.html">
</HEAD>

<BODY TEXT="713D2D" BGCOLOR="#E1CD9D">
<CENTER>
<H1>Rock near Chimayo, New Mexico</H1>
<IMG SRC="graphics/chmyorck.jpg" WIDTH="340" HEIGHT="255" ALT="Rock near Chimayo, NM">
</CENTER>
</BODY>

</HTML>


Page 3 (page3.html):
<HTML>

<HEAD>
   <TITLE>Slideshow: Page 3</TITLE>
<META HTTP-EQUIV="REFRESH" CONTENT="10; URL=../strcture.html#slideshow">
</HEAD>

<BODY TEXT="713D2D" BGCOLOR="#E1CD9D">
<CENTER>
<H1>Rock near Nambé, New Mexico</H1>
<IMG SRC="graphics/namberck.jpg" WIDTH="340" HEIGHT="255" ALT="Rock near Nambé, NM">
</CENTER>
</BODY>

</HTML>


The following is a list of all the <META> tags used on the page you are viewing now:

<HTML>

<HEAD>
<TITLE>HTML Structuring Tags</TITLE>

<META NAME="AUTHOR" CONTENT="Ted M. Montgomery">

<META NAME="DESCRIPTION" CONTENT="This page is part of Ted's HTML Tutorial. Here, you will learn about various aspects of HTML Structuring Tags.">

<META NAME="KEYWORDS" CONTENT="HTML tutorial, <HTML>, <HEAD>, <TITLE>, <BASE>, <META>, author, description, keywords, CONTENT, http-equiv, expires, revisit, revisit-after, robots, <BODY>, links, LINK, active links, ALINK, visited links, VLINK, background color, BGCOLOR, BACKGROUND, <!--comment-->, <BR>, <HR>">

<META NAME="ROBOTS" CONTENT="index, follow">

<META HTTP=EQUIV="EXPIRES" CONTENT="Mon, 31 Dec 2001 23:59:59 GMT">
</HEAD>


The <BODY> tag may contain within it further parameters as part of the command, each designating the particular colors of various elements of a web document (for more on color coding, go to Color Coding):

Most browsers recognize some standard color names (such as AQUA, BLACK, BLUE, CHARTREUSE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, ORANGE, PURPLE, RED, SILVER, TEAL, WHITE, YELLOW, and others).  Otherwise, the color code number (preceded by the “#” character) can be used.  For more on color coding and color names, go to Color Coding.

Here is the <BODY> code of the initial page (“Ted’s Comprehensive HTML Tutorial”) of this portion of my web site:

<BODY TEXT="#FFFF80" LINK="#FFC080" ALINK="#E8A868" VLINK="#C08040" BACKGROUND="graphics/HTMLback.gif" BGCOLOR="#2F6790">, where “HTMLback.gif” is a background I created myself. Note:  Some browsers will not display the BACKGROUND.  For those that do, the BGCOLOR will appear first until the BACKGROUND is loaded.


Here are examples of “empty” tags, so-called because they occur alone and not as part of a pair:

The <HR> tag may contain within it further parameters as part of the command:
  • WIDTH="W": defines the horizontal width “W” of the line on the page.  “W” can be expressed as a percentage “W%” (of the total width of the page) or simply as a whole number without the percent (indicating the number of pixels wide).  The default width is 100%.
  • SIZE="H": defines the vertical height “H” of the line on the page.  “H” can be expressed as a whole number from 0 to 200 (indicating the number of pixels high).  The default size (height) is 2 pixels. Note:  If the size (height) of a horizontal rule is expressed as a percentage (H%), a browser will ignore the “%” sign and make the line H pixels high.
  • ALIGN="LEFT"|"CENTER"|"RIGHT": positions the line at a specific location on the page.    "LEFT" aligns the line with the left margin of the page.
       "CENTER" (the default) centers the line horizontally on the page.
       "RIGHT" aligns the line with the right margin of the page.
  • NOSHADE="NOSHADE": changes the engraved line into a solid line or strip (whose color will be either gray or else the same as the computer screen’s background color, depending on the browser).  Without the NOSHADE parameter, the shaded line appears engraved into the page.
  • COLOR="COLOR"|"#COLOR CODE": indicates the color of a horizontal rule.
  • Here are some examples of horizontal rules:

    1. <HR> will yield:


    1. <HR NOSHADE="NOSHADE"> will yield:


    1. <HR WIDTH="60%" SIZE="15" ALIGN="LEFT"> will yield:


    1. <HR WIDTH="300" SIZE="50" NOSHADE="NOSHADE"> will yield:

    Note:  Some browsers will display a horizontal rule having a NOSHADE="NOSHADE" parameter with squared ends, and some will display it with rounded ends.
    1. <HR WIDTH="600" SIZE="30" ALIGN="RIGHT"> will yield:

    1. <HR WIDTH="7" SIZE="70" ALIGN="CENTER"> will yield:

    Proceed to Color Coding

    Return to Main Page of Ted’s HTML Tutorial

    Copyright © 1998– by Ted M. Montgomery.  All rights reserved.