# 1 Structural Level Tags

Structural Level HTML Tags structure the document instead of structuring the content

TAGS: Cyber Tech, HTML, Standards, TECH

!-- (HTML comment) | !DOCTYPE | a | abbr | acronym | address | applet | area | b | base | basefont | bdo | big | blockquote | body | br | button | caption | center | cite | code | col | colgroup | dd | del | dfn | dir | div | dl | dt | em | fieldset | font | form | frame | frameset | h1 | h2 | h3 | h4 | h5 | h6 | head | hr | html | i | iframe | img | input | ins | isindex | kbd | label | legend | li | link | map | menu | meta | noframes | noscript | object | ol | optgroup | option | p | param | pre | q | s | samp | script | select | small | span | strike | strong | style | sub | sup | table | tbody | td | textarea | tfoot | th | thead | title | tr | tt | u | ul | var

Structural Level Tags structure the document instead of structuring the content. There are 13 Structural Level Tags in three sub-groups:

1. Basic Structural Tags
1. body. OO/OO. Document body.
3. html. OO/OO. Document root tag.
1. base. /FF. EE. Document base URL.
2. isindex. /FF. EE. XX. LD. Single line prompt. SL BL!
4. meta. /FF. EE. Generic meta-information.
5. script. Script statements. SL TL!
6. style. Style info.
7. title. Document title.
3. Frame Tags
1. frame. /FF. EE. FD. Sub-window.
2. frameset. FD. Window subdivision.
3. noframes. FD. Alternate content container for non frame-based rendering.

## Basic Structural Tags

Only one of each of the Basic Structural Tags can be included in a document. There are 3 tags in the Basic Structural Tags sub-group of the Structural Tags group.

### body

OO/OO. Document body. The body contains the bulk of the document content. The <body> tag can be replaced by a <frameset> tag. There can only be one <body> tag in a document and it must follow the <head> tag.

Many browsers will display the content in a window with a little margin by default. It is common to get rid of this margin using non-W3C attributes that are proprietary and browser specific. For Netscape: marginwidth="0" and marginheight="0" is used. For Internet Explorer: leftmargin="0" and topmargin="0" are used. So a typical <body> tag may look like this:

<body topmargin="0" leftmargin="0"
marginwidth="0" marginheight="0">

OO/OO. Document head. The header contains tags that provide information to users, the browser, and search engines. There can only be one <head> tag in a document and it must follow the <body> tag.

### html

OO/OO. Document root tag. The <html> tag encloses the entire document. The SGML tag <!doctype> may reside outside of the <html> tag.

<html>
</html>


Header Tags are enclosed by the <head> tag. The developer uses Header Tags to pass information to the browser or search engine. Item in the header usually have a scope applicable to the entire document.There are 7 tags in the Header Tags sub-group of the Structural Tags group.

### base

/FF. EE. Document base URL. If the <base> tag is not used, then relative URLs are resolved against the location of the current document.

The HREF attribute specifies the URL against which all relative URLs in the document are resolved against.

The TARGET attribute specifies the <frame> where the URLs in the document will open. This is typically used to have one frame open documents in another frame.  See more about TARGET at Tag Features.

Assume that file X (http://www.abc.com/dog/good/index.htm) has a link Y:

<a href="../cat/index.htm">Cats</a>

If file X has no <base> tag in the header, then link Y points to:

http://www.abc.com/dog/cat/index.htm

If file X has a <base> tag Z in the header, then link Y points to:

http://www.abc.com/cat/index.htm

if <base> tag Z is as follows:

<base href="http://www.abc.com/dog/index.htm" />

### isindex

/FF. EE. XX. LD. Single line prompt. SL BL!  The <isindex> tag can also create a inline primitive form, thus it can also be placed in the Basic Block Level Tags sub-group of the Block Level Tags group, where it has a different effect.

The <isindex> tag creates a primitive form asking for user input. An <input> tag should be used instead.

<isindex prompt="Ignore this sample of isindex:" />

The results of the above code would be very rudely shown at the very top of its page. Note that some browsers will add horizontal lines around the prompt.

/FF. EE. A media-independent link. Defines an URL by type, media, and navigational relation to current document. Except for the Link Type of Stylesheet, the various versions of link are used by search engines and user agents (browsers) to help navigate or index the site.

The HREF attrbibute specifies the location of a web document with an URL.

The REL attribute describes the relationship of the current document with the document specified in the HREF attribute. The values of REL is a space-separated list of forward Link Types. Here are the W3C standard Link Types: Alternate, Stylesheet, Start, Next, Prev, Contents, Index, Glossary, Copyright, Chapter, Section, Subsection, Appendix, Help, and Bookmark. There are non-W3C variations that are accepted by most browsers, EG:

The REV attribute describes the relationship of the document specified in the HREF attribute with the current document. The values of REL is a space-separated list of forward Link Types.

The TYPE attribute sets the Internet Content Type.

The MEDIA attribute sets the destination media type, eg screen, print, Braille, speech.

The LANG and HREFLANG attribute specifies the Language Code of an alternate version of the current document when REL contains a Link Type of Alternate.

Here are some of the more important Link Types: contents, index, glossary, copyright, next, previous, start, help, bookmark, and stylesheet.  See also my section on CSS.

<-- Assume the current document is "Chapter2.htm". / -->
<link rel="previous" href="Chapter1.htm" /> <-- Assume the current document is "Chapter3.htm". / --> <link rev="next" href="Chapter2.htm" />
<link rel="start" href="Index.htm" title="The start page of this collection of documents." />

<-- Alternate language versions of the current document exists. / -->
hreflang="ar" charset="ISO-8859-6"
title="in Arabic" />
hreflang="fr" lang="fr"
title="en Fran&ccedil;ais" />
<-- A printable (post script) version of the current document exists. / -->
media="print" type="application/postscript"
title="as postscript" />

<-- This links a current document to a style sheet document. / -->
type="text/css" />

<-- Non-W3C for using the icon for bookmarks. / -->


### meta

/FF. EE. Generic meta-information. Started out as information to pass on to spiders and search engines but any sort of data can be passed here. Some meta tags used to be much more important because search engines utilized them. However in the late 1990s search engines switched to largely examining the content of the page itself instead of the meta tags.

The CONTENT attribute holds the meta-data itself.

The NAME or HTTP-EQUIV attribute define what kind of content the CONTENT attribute holds. The HTTP-EQUIV attribute also has information that the page sends to its web server before the page is sent to the user's browser.

<meta name="description"
content="Concise & accurate page description, approx. 25 words." />

<meta name="keywords"
content="pet, pets, dog, cat, parrot, parot, pet supplies" />

<meta name="Microsoft Border" content="sharedBorders">
<!-- This is used by IIS to automatically insert html pages as borders
if the server has MS FrontPage components installed.
A typical value for a sharedBorders is "tlrb, default". / -->

<meta name="robots" content="RobotInstructions">
<!-- Where RobotInstructions can be:
all, none, index, noindex, follow, or nofollow. / -->

<meta http-equiv="Expires" content="0">
<!-- Prevents a document from being cached. -->

<meta http-equiv="Content-Script-Type" content="type">
<!-- Where type is a content type naming the default scripting language.
Examples of type include: text/vbscript, text/tcl, and text/javascript. / -->

<meta http-equiv="Content-Type" content="type/subtype">
<!-- Used to explicitly state the kind of content.
Examples of type/subtype include: text/html, image/gif, image/jpeg, and text/plain. / -->

<meta http-equiv="Content-Type" content="text/html; charset=characterSet">
<!-- Used to explicitly state the character set used.
Examples of characterSet include: windows-1252, iso-8859-1, and utf-7. / -->

<meta http-equiv="Content-Language" content="language">
<!-- Used to explicitly state the real world language used.
Examples of language include en-us. / -->


### script

Script statements. SL TL! The <script> tag can also create inline scripts, thus it can also be placed in the Special Markup Tags sub-group of the Text Level Tags group.

Client-side script that may be referenced from anywhere else in the document. Usually scripts for common functions and such are placed in the header. Contrast this with placing <script> in the <body> for inline scripts. Script is usually placed in SGML comments so it is ignored by no-script using browsers.

The SRC attribute can specify the location of an external script.

The TYPE attribute can specify a scripting language to override the default scripting language. Different scripting languages can be used including JavaScript and VBScript. The format of the values for this attribute are content types. EG: "text/vbscript". Note that the default scripting language for the page can be set with a <meta> tag in the header:

The LANGUAGE attribute can specify a scripting language to override the default scripting language. This is deprecated in favor of the TYPE attribute since the values were not standardized.

<script type="text/javascript" language="JavaScript">
<!-- // Lines of script usually go here. /-->
</script>

<script type="text/vbscript" src="includes/myScript.vbs">


The DEFER attribute tells the browser that the script will not generate any document content (EG: In JavaScript no document.write()), and thus the browser can continue parsing and rendering.

### style

Style info. Styles to be applied to the current document. See also my section on CSS.

<style><!--
p { color: #990000; }
/--></style>
<!-- This turns all paragraphs red. /-->


### title

Document title. The official title of the entire document. This is required. There may only be one <title> element per document. This usually displays in the window title bar of the browser. This may well be different from the name of the HTML file itself and whatever navigational management aids you use such as the navigation titles in MS FrontPage.

Note that in XHTML, the <title> tag must be the first item in the <head> tag.

<title>Welcome Page</title>

## Frame Tags

Frame Tags breaks the browser into sub-windows called frames where each frame can display a different HTML document. See also the <iframe> tag grouped with Text Level Tags, sub-group Special Markup Tags.

A frame is to a frameset, as a pane is to a multi-pane window. Many people dislike frames because of the potential problems of navigating with them, especially if you clicked your way to a page that is specifically supposed to be a frame in a frameset.

There are 3 tags in the Frame Tags sub-group of the Structural Tags group.

### frame

/FF. EE. FD. Sub-window.

The FRAMEBORDER attribute can be set to either 1 (the default) or 0, i.e. whether there is or is not a border around the frame respectively.

The SCROLLING attribute can be set to auto (the default), yes, or no, to determine whether scroll bars are present.

The MARGINWIDTH and MARGINHEIGHT attributes can be set to positive integer values that indicate the number of pixels between the content and its side borders or vertical border respectively.

<frame scrolling="yes"
border="1"
marginheight="5"
name="main"
/>


### frameset

FD. Window subdivision. The <frameset> tag can replace the <body> tag in a document. <frameset> tags can be nested to any level.

The row and col attributes of the <frameset> tag are comma-separated lists of the desired number of rows and columns. The possible values may be in pixels (eg "10"), percentage (eg "25%"), or a relative share (eg 3*).

<frameset col="*,250,2*">
<frame src="L.htm" name="left">
<frame src="M.htm" name="mid">
<frame src="R.htm" name="right">
<-- The mid is 250 pixels, the other two split the remaining space in 1 to 2 ratio. /-->
</frameset>


### noframes

FD. Alternate content container for non frame-based rendering.

<head> ... </head>
<frameset>
...
<noframes>
<p>Sorry but you don't support frames, please see the
<a href="somepage.htm">non-frames version.</a>
</p>
</noframes>
</frameset>


GeorgeHernandez.comSome rights reserved