Index of
Terms and Resources
Shaping the PiecesSpin Doctor's
Web Design 101
Maximizing Meaning
in Your Text
TRANSACTION.NET
home page



Purpose and Placement of
HTML Commands

We offer this table as a quick reference to supplement the HTML tutorial. It shows the commands, a brief statement of their use, which attributes can modify them, and which commands they can inhabit or include, but it doesn't go over the basics of HTML syntax. If you're new to HTML, visit Spin Doctor's Web Design 101 first.

GlobalHeadBody:

Character Formatting
Breaks, Headings, and Titles
Images and Forms
Lists and Tables
Hypertext Anchors


Commands Purpose Attributes and
Extensions
Can
Subsume:
Can be
Nested inside:
Global
<<<TopNext>>
<!--...--> allows you to insert a line of browser-invisible comments in your document some browsers may execute the tags inside comment lines, so it's best to avoid nesting commands within comments
<html>...</html> marks the opening and closing of an HTML document <head>...</head>
<body>...</body>
surrounds all other HTML commands
<head>...</head> creates the head of an HTML document <title>...</title>
<meta>
<isindex>
<base>
<nextid>
<link>
immediately after <HTML> and before <BODY>...</BODY>
<body>...</body> creates the body of an HTML document background= designates a file to be displayed as background
bgcolor="#(hexadecimal color code)" sets the background color
text="#(hexadecimal color code)" sets the color of plain text
link="#(hexadecimal color code)" sets the color of unfollowed text links
alink="#(hexadecimal color code)" sets the color of active text links
vlink="#(hexadecimal color code)" sets the color of visited text links
all lists,
anchors, tables,
forms, images,
text, breaks, characters,
and headings
inside
<html>...</html>
and after <head>...</head>
<isindex> activates the browser's searching function HTML 3.0:
prompt="..." allows you to specify the search prompt.
(default prompt is "This is a searchable index. Enter search keywords:")
<blockquote>
...</blockquote>
<body>...</body>
<dd> or <li>
<form>...</form>
<head>...</head>
Head
<<PreviousTopNext>>
<link> this command, primarily used by HTML-generating tools, indicates a relationship to other documents (and unlike anchors, cannot indicate relationships to parts of documents) href="url" of document linked to this one
name=anchor (if the link is an anchor)
rel="(linked to document in relation to this document)"
rev="(reverse rel b/w this doc and other doc)"
urn=uniform resource number
title="title of linked-to doc"
methods="ftp, gopher, etc." (method of retrieving other document)
inside

<HEAD>
...</HEAD>

<meta> allows you to specify metacontent (self- referential content, or information about the document itself--meant to be read by machines) http-equiv="name" content="value" names a new HTTP header field whose data will be specified as CONTENT
HTTP-Equiv="Expires content="never"

name="key" of key/value pair.
content="value" of key/value pair.

<base> indicates the full URL of the current document href="URL"
<title>...</title> allows you to select a title that will appear in the title bars of browser windows and in bookmarks (default is the actual filename of your document)
Body
<<PreviousTopNext>>
Formatting
<<PreviousTopNext>>
<center>...</center>
centers
enclosed
text
<br>
<a>...</a> or <img>
<address>...</address>
<em>...</em>
<strong>...</strong>
<code>...</code>
<samp>...</samp>
<kbd>...</kbd>
<var>...</var>
<cite>...</cite>
<tt>...</tt>
<b>...</b>
<i>...</i>
<blockquote>
...</blockquote>

<body>...</body>

<form>...</form>

<dd> or <li>

<th>...</th> or <td>...</td>

<font size=# >...</font>

Netscape extension

the value for the size attribute can be a number from 1 to 7 (default is 3), or (in quotation marks) a number relative to the current size, e.g. "+2".

<br>
<img>
<a>...</a>
<em>...</em>
<strong>...</strong>
<code>...</code>
<samp>...</samp> <kbd>...</kbd>
<var>...</var>
<cite>...</cite>
<tt>...</tt>
<b>...</b>
<i>...</i>
<p>
<a>...</a>
<address>...</address>
<b>...</b>
<cite>...</cite>
<code>...</code>
<dd>, <dt>, or <li>
<h#>...</h#>
<em>...</em>
<i>...</i>
<kbd>...</kbd>
<pre>...</pre>
<samp>...</samp>
<td>...</td>
<strong>...</strong>
<tt>...</tt>
<var>...</var>
<basefont size=#>

Netscape extension

the value for the size attribute can be a number from 1 to 7. the default is 3.

<p>
<a>...</a>
<address>...</address>
<b>...</b>
<cite>...</cite>
<code>...</code>
<dd> or <li> <em>...</em>
<h#>...</h#>
<i>...</i>
<kbd>...</kbd>
<pre>...</pre>
<samp>...</samp>
<strong>...</strong>
<tt>...</tt>
<var>...</var>
can be used only once inside
<body>...</body>
<b>...</b> emboldens enclosed text <br>


<img>


<a>...</a>


<em>...</em>


<strong>...</strong>


<code>...</code>


<samp>...</samp>


<kbd>...</kbd>


<var>...</var>


<cite>...</cite>


<tt>...</tt>


<b>...</b>


<i>...</i>


<p>

<a>...</a>

<address>...</address>

<b>...</b>

<cite>...</cite>

<code>...</code>

<dd>, <dt>, <li>

<h#>...</h#>

<kbd>...</kbd>

<em>...</em>

<pre>...</pre>

<samp>...</samp>

<strong>...</strong>

<tt>...</tt>

<var>...</var>

<th>...</th> or <td>...</td>

<em>...</em> tells browser to emphasize
enclosed text
<strong>
...</strong>
tells browser to place stronger emphasis on enclosed text
<cite>
...</cite>
a citation
<kbd>...</kbd> distinguishes text to be typed
<samp>
...</samp>
sample text
<tt>...</tt> renders text in monospaced typewriter font
<i>...</i> puts the text in italics
<pre>...</pre> preformatted
  t e x t
to be displayed with spacing intact
<address>
...</address>
used to format, for example,
signature files
and/or copyright information

at the end of a document
<code>...</code> code sample
<var>...</var> placeholder or variable for some other value
<blink>...</blink> makes the text blink. use at your own risk.
<h1>...</h1>
<h2>...</h2>
<h3>...</h3>
<h4>...</h4>
<h5>...</h5>
<h6>...</h6>
marks six levels of headings
(1 is largest;
6 smallest)
align=center (3.0) <blockquote>
...</blockquote>
<body>...</body>
<pre>...</pre>
<address>...</address>
<form>...</form>
<th>...</th> or <td>...</td>
Refer to this chart if you plan to use special characters--machine-readable characters like <brackets>, "quotation marks", & ampersands--in your text.
Lists
<<PreviousTopNext>>
<ul>...</ul>
<ol>...</ol>
<dl>...</dl>
allow you to create lists:
1. ordered,
  • unordered, or
    plain
  • Netscape

    type= sets the type of marker (1, A, a, i, disc, circle, square) introducing each list item
    start= overrides usual alphabetical/numerical sequence of ordered lists

    <li>, for ordered and unordered lists;

    <dt> and <dd> for definition lists

    <blockquote>
    ...</blockquote> <body>...</body> <dd> or <li> <form>...</form> <th>...</th> or <td>...</td>
    <li> [...</li>]

    opens an indented list item (with a number, in an ordered list,
    or a
  • bullet, in an unordered list)
  • type= sets the type of marker (1, A, a, i, disc, circle, square) introducing each list item
    value= allows you to set the number or letter of an ordered list item
    <a>...</a> <img> <br> em strong code samp kbd var cite tt <b>...</b> i <p> ol ul dir menu dl <pre>...</pre> <blockquote>
    ...</blockquote>
    dir menu ol ul
    <dt>
    <dd>
    these tags mark the terms and definitions (respectively) in a definition list <dl>...</dl>
    Tables
    <<PreviousTopNext>>
    <table>...</table> creates a table Netscape extensions:
    border=
    (width, in pixels, of the border to be drawn around the table. a value of FRAME will enclose just the outside of the table; BASIC, the border and cells)
    cellpadding= (spacing between the contents of the cell and the cell borders)
    cellspacing= (size of the lines dividing the data cells) width= (width in pixels or a percentage of the window)
    <tr>...</tr>

    <caption>...</caption>

    <blockquote>
    ...</blockquote> <body>...</body> <dd> or <li>, <form>...</form> <td>...</td>
    <caption>...</caption> allows you to label a table with a caption align=top, bottom <table>...</table>
    <tr>...</tr> creates a table row align=leftrightcenter valign=
    (top middle bottom baseline)
    <th>...</th> or <td>...</td> <table>...</table>
    <td>. . .</td>
    <th>. . .</th>
    creates a data cell or header cell in a table row rowspan=
    (the number of rows spanned by the cell) colspan= (the number of columns spanned by the cell)
    align= (left, right, center: horizontal alignment of the cell contents)
    valign= (top, middle, bottom: the vertical alignment of the cell contents)
    nowrap (indicates not to wrap the cell contents)
    width= (width in pixels or in a quoted percentage of the window)
    <p><isindex> <hr>
    <a>...</a>
    <h#>...</h#>
    ol, ul, dir, menu, dl,
    pre,
    <blockquote>
    ...</blockquote>
    <form>...</form>

    <address>...</address> table
    <tr>...</tr>
    Hypertext
    <<PreviousTopNext>>
    <a>...</a> creates a link to another document or to another segment of the same document href="URL" or "file" or "#name" of subfile in the document


    name="name of subfile in this document"

    rel, rev, urn, title, methods

    <img>
    <br>
    <em>...</em>
    <strong>...</strong>
    <code>...</code>
    <samp>...</samp>
    <kbd>...</kbd>
    <var>...</var>
    <cite>...</cite>
    <tt>...</tt>
    <b>...</b>
    <i>...</i>
    <body>...</body> <address>...</address> b cite code <dd>, <dt> or <li> <em>...</em>
    <h#>...</h#> <i>...</i>
    <kbd>...</kbd>
    <pre>...</pre>
    <samp>...</samp>
    <strong>...</strong>
    <tt>...</tt>
    <var>...</var>
    <th>...</th> or <td>...</td>
    Images
    <<PreviousTopNext>>
    <img> loads an inline image ismap=
    src=
    alt="text"
    Netscape extensions:
    align texttop/ absmiddle /baseline /bottom,
    vspace
    hspace
    width
    height
    border
    lowsrc="file to be loaded with the main document"
    <a>...</a>
    <address>...</address>
    <b>...</b>
    cite code <dd>, <dt>, or <li> em
    <h#>...</h#> i kbd p samp strong tt var
    Forms
    <<PreviousTopNext>>
    <form>...</form> creates a form action="URL" of script to process form input
    method="get" or "post" how the input will
    be sent to the gateway on the server side
    enctype=
    "application/ x-www-form-urlencoded" only one value possible right now
    <h#>...</h#> p, lists, pre, <blockquote>
    ...</blockquote>, isindex table hr address input select textarea
    <blockquote>
    ...</blockquote> <body>...</body> <dd> or <li> <th>...</th> or <td>...</td>
    <input> input widget for a form type="(checkbox/ hidden/ radio /reset /submit /text /image)"
    name="name of this item as passed to the script (in name/value pair),"
    value="default value (for text or hidden widget);
    value to be submitted with the form (for a checkbox or radio button);
    or label (for Reset or Submit buttons)"
    src="source file for an image",\
    checked indicates that checkbox or radio button is checked
    size="size in chars of text widget"
    maxlength="no of characters in a text field"
    align="(texttop/ absmiddle /baseline /bottom,)"
    <form>...</form>
    <textarea>...
    </textarea>
    multiline text entry widget name=" (name to be passed to the script as part of name/value pair)"
    rows="no. of rows"
    cols="(no. of cols.)"
    <form>...</form>
    <select> creates a menu or scrolling list of possible items name=name of data field
    size=#of items to display
    multiple allows multiple selections
    <option> <form>...</form>
    <option> indicates a possible item within a select widget selected=default selection
    value="data submitted if this option is selected"
    <select>
    Breaks, Headings, and Titles
    <<PreviousTop
    <title>. . .</title> allows you to select a title
    that will appear above your browser window
    (default is the actual filename of your document)
    inside <HEAD>
    ...</HEAD>
    <h1>...</h1>
    <h2>...</h2>
    <h3>...</h3>
    <h4>...</h4>
    <h5>...</h5>
    <h6>...</h6>
    marks six levels of headings
    (1 is largest;
    6 smallest)
    align=center (3.0) <a>...</a> img
    br em strong code samp kbd var cite tt <b>...</b> i
    <blockquote>
    ...</blockquote>
    <body>...</body>
    <pre>...</pre>
    <address>
    ...</address>
    <form>...</form>
    <th>...</th> or <td>...</td>
    <p> creates a paragraph

    break

    <a>...</a>
    <img> and <br>
    em strong code samp kbd var cite tt <b>...</b> i
    <blockquote>
    ...</blockquote> <body>...</body> <dd> or <li> <form>...</form>
    <br> forces
    a
    line
    break
    clear=right, left, all (3.0) <a>...</a>
    <address>
    ...</address>
    <b>...</b>
    cite
    code
    <dd>, <dt> or <li>
    <h#>...</h#>
    em
    i
    kbd
    <p>, <pre>...</pre>
    samp
    strong
    tt
    var
    <hr> draws a horizontal rule line Netscape extensions:
    size=(in pixels, the width of the line itself)
    width=(in pixels, or a "#%" of the screen, the width traversed by the line)
    align=(horizontal placement of the line, if it doesn't cross the entire screen)
    noshade eliminates the line's shadow
    <blockquote>
    ...</blockquote> <body>...</body>, <form>...</form>, <pre>...</pre>, <td>...</td>


    TopMaximizing
    Meaning

    in Your Text
    return to

    TRANSACTION.NET
    Home

    http://www.transaction.net/web/tutor/cmdtable.html
    zisk@well.com