|
Here you can find all kinds of useful information on html tag elements, how and where they are used.
Last Update 06-16-03
|
|
In these tag summary tables:
string any alphanumeric string
URL a Uniform Resource Locator for a resources
... a series of elements
value1|... a series of possible values for attributes
n a positive whole number
c a character
color the color of text or areas of a page; specified as #RRGGBB, where RR, GG, and
BB are the hexadecimal digits specifying the Red, Green, and Blue values of the color. The value of color attributes can also be specified by these color names:
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.
|
|
HTML Structure and Comment Elements
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<HTML>...</HTML>
|
|
Identifies the file as containing HTML; only HEAD, BODY, and comment elements should go inside the HTML start and stop tags.
|
|
|
Version="string"
|
Where string identifies the version of HTML; for example: <HTML Version="-//IETF//DTD HTML 3.2//EN">
|
|
<!--- string -->
|
|
Comments that browsers shouldn't display (string) can be included between these tags.
|
|
TOP
|
|
The HEAD and Related Elements
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<HEAD>...</HEAD>
|
|
brackets a set of unordered descriptive information about a document. Elements within the HEAD element include: TITLE, BASE, ISINDEX, STYLE, SCRIPT, LINK,
META, and NEXTID
|
|
<TITLE> string </TITLE>
|
a string identifying the contents of the document; may not contain anchors, paragraph elements, or highlighting; every HTML must have one TITLE element.
|
|
<BASE>...</BASE>
|
used to record the URL of the original version of a document; useful for when the source file is transported elsewhere
|
|
Href="URL"
|
|
<ISINDEX>
|
|
marks the document as searchable--the server on which the document is located must have a search engine defined that supports this searching.
|
|
<STYLE>
|
a way for the author of a document to define rendering information which will work with style sheets.
|
|
<SCRIPT>
|
reserved for future use with scripting languages.
|
|
<LINK>
|
used to define a relationship between the document and other objects or documents.
|
|
Href="URL
|
this identifies the document or part of a document to which this link refers.
|
|
Name="rel|rev"
|
this is a way to name this LINK as a possible destination for another hypertext document;
|
|
Rel="made|..."
|
similar to rel, above, but the rev attribute indicates the reverse relationship as Rel. For Example, the LINK with Rel="made" indicates that the Href attribute indicates the URL given in the Href is the author of the current document. Using the Rev="made" link indicates that the current document is the author of the URL given in the Href attribute.
|
|
Urn="string"
|
indicates the Uniform Resource Name of the document; the specification for URN and other addressing is still in development (http://www.w3.org/hypertext/
Addressing/ Addressing.html).
|
|
Title="string"
|
this attribute is not to be used as a substitute for the TITLE attribute of the document itself, but as a title for the document given by the Href attribute of the LINK element. This attribute is rarely used or supported by browsers, but may have value for cross referencing the relationships the LINK element defines.
|
|
Methods="..."
|
describes the HTTP methods the object referred to by the Href of the LINK element supports. For example, one method is searching; a browser could thus use
this Methods attribute to give information to the user about the document defined by the LINK element.
|
|
<META>
|
|
used to identify meta-information (information about information) in the document. This element is not meant to take the place of elements which already
have a specific purpose.
|
|
Http-equiv="..."
|
This attribute connects this META element to a particular protocol response which is generated by the HTTP server hosting the document.
|
|
Http- equiv="refresh" Content="n"
|
browser will reload the currently displayed page after n seconds.
|
|
Http- equiv="refresh" Content="n; Url=URL"
|
browser will load the document at URL after displaying the currently displayed page for n seconds.
|
|
Http-equiv="expires" Content="string-date"
|
an expiry date for files that are periodically updated. string-date could be, for example, "17-Jan-1999 15:00:00 GMT"
|
|
Name="string"
|
This attribute is a name for the information in the document--not the title of the document (which should be defined in the TITLE element) but a "meta name" classifying this information.
|
|
Content="string"
|
A "meta name" for the content associated with the given name (defined by the Name attribute) or the response defined in Http-equiv.
|
|
<NEXTID>
|
|
This element is used by text generated software in creating identifiers;
|
|
N="string"
|
used to define the next identifier to be allocated by the text generator program. Normally, human writers of HTML don't
use this element; and Web browsers ignore this element.
|
|
TOP
|
|
The BODY and Related Elements
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<BODY>...</BODY>
|
|
delimit the content of an HTML document
|
|
Background = "URL"
|
the URL of the graphic that will be tiled as the background of the page
|
|
BGColor="color"
|
the color of the background of the page;
|
|
Text="color"
|
the color of the document's text.
|
|
Link="color"
|
the color of the document's hotspots
|
|
VLink="color"
|
the color of the document's visited links
|
|
ALink="color"
|
the color of the document's hotspots during user selection
|
|
<A>...</A>
|
|
the anchor element which is used as the basis for linking documents together.
|
|
Href="URL"
|
this attribute identifies the URL of the hypertext reference for this anchor in the form Href="URL", where the URL given will be the resource
which the browser retrieves when the user clicks on the anchor's hotspot.
|
|
Name="string"
|
this attribute creates a name for an anchor; this name can then be used within the document or outside of the document in anchor to refer to the portion of
text identified by the name.
|
|
Title="string"
|
this
attribute is for the title of the document given by the Href attribute of the anchor. A browser could use this information to display this title before retrieving it, or to provide a title for the Href document when it is retrieved (e.g., if the document is at a FTP site, it will not have a title defined).
|
|
Rel="made|..."
|
Defines the relationship defined from the current document to the target (Href document). See the discussion of the Rel attribute in the LINK element,
above.
|
|
Rev="made|..."
|
Defines the relationship defined from
the target (Href document) to the current document. See the discussion of the Rev attribute in the LINK element, above.
|
|
Urn="string"
|
This indicates the Uniform Resource Name of the target (Href) document; the specification for URN and other addressing is still in development.
|
|
Methods="..."
|
Provides information about the functions the user can perform on the Href object. Similar to described above for the Title attribute, this information might
be useful for the browser to display in advance.
|
|
TOP
|
|
Character blocks: elements that "chunk" text in lists or blocks
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<DIV>...</DIV>
|
|
used to define a block or paragraph
|
|
|
Align="left|right"
|
aligns the block or paragraph of text
|
|
<BLOCKQUOTE>...</BLOCKQUOTE>
|
|
|
|
<PRE>...</PRE>
|
sets up a block of text which will be presented in a fixed-width font, with spaces as significant.
|
|
<BLOCKQUOTE>...</BLOCKQUOTE>
|
brackets text that is an extended quotation from another source.
|
|
<UL>...</UL> <OL>...</OL> <MENU>...</MENU> <DIR>...</DIR>
|
Lists for information; all use the LI element to identifiy the elements.
- UL brackets an unordered list of items;
- OL brackets an ordered list of items;
- MENU brackets an unordered list of items;
- DIR brackets a list of items which are at most 20 characters wide;
|
|
Compact
|
makes the list compact
|
|
Type="disc|circle|squar e"
|
defines the bullet type for a UL list;
|
|
Type="1|a|A|i|I"
|
defines the bullet type for a OL list; 1 (arabic numbers: 1, 2, 3, ...); a (lower alpha: a, b, c, ...) A (upper alpha: A, B, C, ...) i (lower roman: i, ii,
iii, ...) I (upper roman: I, II, III, ...)
|
|
Start="N"
|
starts the OL list off with a sequence starting at N.
|
|
<LI>
|
|
identifies a list element in UL, OL, MENU, DIR.
|
|
<DL>...</DL>
|
A definition list, or glossary; uses DT to identify terms and DD to identify definitions.
|
|
Compact
|
makes the list compact.
|
|
<DT>
|
|
identifies term in definition list (DL).
|
|
<DD>
|
identies description in definition list (DL).
|
|
<ADDRESS>...</ADDRESS>
|
ownership or authorship information, typically at the start or end of a document.
|
|
TOP
|
|
Headers
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<H1>...</H1>
|
|
Level 1 Header
|
|
<H2>...</H2>
|
Level 2 Header
|
|
<H3>...</H3>
|
Level 3 Header
|
|
<H4>...</H4>
|
Level 4 Header
|
|
<H5>...</H5>
|
Level 5 Header
|
|
<H6>...</H6>
|
Level 6 Header
|
|
TOP
|
|
Separators
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<HR>...</HR>
|
|
creates a horizontal rule.
|
|
Size="n"
|
this attribute identifies the thickness of the line.
|
|
Noshade
|
this attribute turns off shading to create a solid bar.
|
|
Width="n| n%"
|
this attribute identifies the width of the line, either expressed as width in pixels, or a relative with as a percent of the current display width (not page
width). These lines are by default centered (default can be overridden with the Align attribute).
|
|
Align="left| right| center"
|
specifies the alignment of horizontal lines that are less than the full width of the page.
|
|
<P>
|
|
identifies start of paragraph; the stop tag </P> is optional.
|
|
|
Align="center|right|left "
|
aligns a paragraph;
|
|
TOP
|
|
Spacing
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<BR>
|
|
forces a linebreak. Typically, this is used to represent postal addresses or text; where linebreaks are significant.
|
|
TOP
|
|
Alignment
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<CENTER>string</CENTER>
|
|
centers text.
|
|
TOP
|
|
Images
|
|
TAG (start...stop)
|
Attributes
|
Explanation
|
|
<IMG>...</IMG>
|
|
places graphic image in a document at the location of the element tag (an "inline image").
|
|
Src="URL"
|
identifies the source file of the image.
|
|
Alt="string"
|
a string of characters can be defined that will be displayed in non-graphical browsers. Non-graphical browsers otherwise ignore the IMG element.
|
|
Align="top|middle|bott om|left|right"
|
sets the positioning relationship between the graphic and the text that follows it; values include:
- top: the text following the graphic should be aligned with the top of the graphic.
- middle: the text following the graphic should be aligned with the middle of the graphic.
- bottom: the text following the graphic should be aligned with the bottom of the graphic.
- left: the image is pushed to the left margin of the page.
- right: the image is pushed to the right margin of the page.
|
|
Width="n"
|
defines the width of the image.
|
|
Height="n"
|
defines the height of the image.
|
|
Border="n"
|
defines the border above and below the image.
|
|
Vspace="n"
|
defines the vertical space around the image.
|
|
Hspace="n"
|
defines the horizontal space to the left and right of the image.
|
|
Ismap
|
this attribute identifies the image as an image map, where regions of the graphic are mapped to defined URLs. Hooking up these relationships requires
knowledge of setting an image map file on the server to define these connections.
|
|
Usemap="string"
|
identifies which MAP element, as defined in the Name attribute, that you are using for a client-side image map.
|
|
<MAP>...</MAP>
|
|
define client-side image maps
|
|
|
Name="string"
|
string is the name you use as the value of the Usemap attribute of the corresponding IMG element.
|
|
<AREA>...</AREA>
|
|
defines correspondence between pixels and URLs in client side image map element MAP used in conjunction with IMG
|
|
|
Shape="rect|poly|circle "
|
Sets the shape of the hotspot in the image
|
|
Shape="rect" Coords="left,top,right, bottom"
|
Sets the perimeter x-y coordinates of a rectangle
|
|
Shape="poly" Coords="x1,y1,x2,y2,... xn,yn""
|
Sets the border coordinates of a polygon
|
|
Shape="circle" Coords="x,y,r"
|
Sets the center (x, y) and radius (r) of a circle
|
|
Href="URL"
|
Defines the URL associated with this AREA
|
|
Nohref
|
Defines this AREA as a "deadspot," with not URL associated with it
|
|
<FIG>...</FIG>
|
|
define a figure
|
|
|
Src="URL"
|
defines the source of the figure
|
|
TOP
|
|
Character formatting
|
|
TAG (start... |