HTML Glossary

This is a glossary of HTML tags, which defines each tag and shows examples of their use and what they will look like. Note that how each of these tags looks is dependent on the browser that you are using and the Preferences set within it.

The tag definitions are seperated according to function. Going to the alphabetical listing at the end of the glossary is the quickest way to find a particular tag.


Alphabetical Listing of Tags Documentation In-Line Images
  • Anchors (Links/Targets) Elements in the Head Tables
    Breaking Up Text Headers Text Appearance

    Documentation

    The following tags are primarily for the purpose of making your HTML easier to read, by seperating it into different components. Netscape's additions to the <body> tag make it more functional than that.

    <html> </html> - mark the beginning and end of the entire HTML document.

    <head> </head> - mark the beginning and end of the head portion of the HTML document.

    <body> </body> - mark the beginning and end of the body of the HTML document.

    Netscape allows a couple of additional attributes in the <body> tag. These are:


    Elements in the Head

    The head portion of an HTML document is generally used to specify a variety of things that are specific to the document. The only tag in general use is:

    <title> text </title> - specifies the text that will appear in the title bar of your browser (in Netscape it will appear in the blue bar at the top of the Netscape window, right after "Netscape - "). If you don't specify a title, Netscape puts the URL of your Web page in the title bar. The title of a page is also the text generally used by Netscape and other browsers as the name of bookmarks pointing to that page.

    Others include: <base> - specifies the base URL of the Web page in question. Generally used for documentation purposes, where the page may be read out of context. Relative URLs will be resolved relative to the URL specified in the <base> tag (whereas they are normally resolved relative to the URL used to access the Web page).


    Breaking Up Text

    Web browsers don't recognize carriage returns in an HTML document. So, even if your HTML looks neatly divided up into seperate lines and paragraphs in your HTML or text editor, Netscape et al will run it all together unless you use the following tags.

    <p> - the paragraph tag. Inserts a blank line between the text preceding the tag and that following it. <p> is not cumulative -- that is, several <p> grouped together have the same effect that a single <p> does. Doesn't have an ending tag.

    <br> - the line break tag. Text following this tag starts on a new line, but without a blank line between it and the text before the tag. <br> is cumulative -- a blank line will be inserted for each <br>. Doesn't have an ending tag.

    Netscape allows the following attribute within the <br> tag: <hr> - the horizontal rule tag. Produces a shaded engraved line seperating the text preceding the tag and that following it. Doesn't have an ending tag.

    Netscape allows the following attributes within the <hr> tag:

    Examples


    Headers

    The above is an example of a header. Headers are used to seperate out sections of the Web page. A blank line is placed before and after each line of a header. There are six levels of header:

    <h1>Produces this size text</h1>

    <h2>Produces this size text</h2>

    <h3>Produces this size text</h3>

    <h4>Produces this size text</h4>

    <h5>Produces this size text</h5>
    <h6>Produces this size text</h6>

    Text Appearance

    There are numerous ways to make some text stand out, including boldfacing and italization. The following four tags are specific -- forcing the Web browser to display the text in an exact way.

    <b> text </b> - specifies that text should be boldfaced.

    <i> text </i> - specifies that text should be italicized.

    <u> text </u> - specifies that text should be underlined. Ignored if the Web browser showing the page is configured to underline links (which is the default in Netscape).

    <tt> text </tt> - specifies that text should be printed in the fixed font specified in the browser's preferences rather than the variable font (which text is normally displayed in).

    The following tags are handled differently by different browsers. Using them allows the browser to decide whether boldfacing or italization is appropriate for providing emphasis, or for showing citations etc., rather than you deciding.

    <address> text </address> - specifies that text is an address. It will be set off on a seperate line as well as having a different appearance.

    <cite> text </cite> - specifies that text is a citation.

    <code> text </code> - specifies that text is computer code (HTML or some other language).

    <dfn> text </dfn> - specifies that text is a definition.

    <em> text </em> - specifies that text should have emphasis.

    <kbd> text </kbd> - specifies that text is text that should be entered on the keyboard.

    <sample> text </sample> - specifies that text should be set off as a sample.

    <strong> text </strong> - specifies that text should be strong.

    <var> text </var> - specifies that text is a variable.

    Netscape adds the following text appearance tags: <basefont> text - specifies the base font characteristics for all text following the tag. Generally used to change the base that relative uses of <font> works from. No closing tag.

    <blink> text </blink> - specifies that text should blink.

    <center> data </center> - specifies that data should be centered on the page.

    <font> text </font> - specifies font characteristics of text.


    Lists

    HTML has several ways to format lists in order to make them more readable. The different types are bulleted lists, definition lists, directory lists, menu lists, and numbered lists. Their elements are discussed seperately below, except for <li> (list item), which is common to all of them except definition lists.

    <ul> <li>list item <li>list item . . . </ul> - produces a bulleted list (each list item is preceded by a bullet/symbol). If bulleted lists are nested, the bullets go from solid discs at the highest level, to circles, to squares, and so on to the deepest level. Each list item is preceded by the <li> tag. If no <li> tags are used, text within the <ul> tags will be indented, but will not have any bullets in front of it. Normal <br> and <p> tags can be used to break up the text.

    Netscape allows the following additional tag within <ul>:

    <dir> <li>list item <li>list item . . . </dir> - produces a directory. Functionally equivalent to <ul>.

    <menu> <li>list item <li>list item . . . | text </menu> - produces a menu. Functionally equivalent to <ul>.

    <ol> <li>list item <li>list item . . . </ol> - produces a numbered list (an ordered list).

    Netscape allows the following extensions to <ol>: <li> data - a list item. The data from the <li> tag until the next <li> tag, or the end tag of the list will be treated as a seperate item (bulleted or numbered or just lined seperately depending on the type of list). Data can be either text or images.

    Netscape allows the following extensions to <li>: <dl> <dt>term item <dd>definition item </dl> - produces a definition list. Term items generally alternate with definition items.

    <dt>text - specifies that the text from the <dt> until the next <dt>, <dd> or </dl> is a term item (a term to be defined). The text is left-justified.

    <dd>text - specifies that the text from the <dt> until the next <dt>, <dd> or </dl> is a definition item (the definition of the preceding term item presumably). The text is indented.


    Anchors (Links/Targets)

    The thing that makes a Web page a hypertext is its ability to link text to other Web pages, other text within the same text, other Internet resources, or images. Anchors are the HTML elements that make this possible. An anchor can either be a link to another place, or a target for other anchors.

    <a> data </a> - Specifies that data is an anchor.

    Attributes within the <a> tag:

    In-Line Images

    An in-line image is one that shows up directly on the Web page.

    <img> - places an in-line image in the Web page at the position of the <img> tag.

    Attributes within the <img> tag: Netscape allows the following additions to the <img> tag:

    Tables

    Netscape (and the upcoming HTML 3.0 specification) allow you to create tables on a Web page. Tables can be used to attractively format information into rows and columns (see our class syllabus for an example).

    <table> </table> - mark the beginning and end of a table.

    Attributes within the <table> tag: <tr> </tr> - mark the beginning and end of a row within a table. The width of a row in columns is determined by the largest number of cells in the widest row of the table. Attributes within the <tr> tag: <td> data </td> - Specifies that data is the contents of a cell within the table. Data can be either text or an image/s.

    Attributes within the <td> tag: <th> data </th> - Specifies that the cell with data in it is a header cell. Any text in the cell will be in a bold font and the default align is center, rather than left. Data can be either text or an image/s.

    The attributes within the <th> tag are the same as those within the <td> tag. <caption> data </caption> - Specifies the caption for the table. Data will be centered horizontally with respect to the table and can appear either above or below the table. The <caption> tags should be within <table> tags, but not within <tr>, <td>, or <th> tags. One attribute can appear within the <caption> tag:

    An Alphabetical Listing of Tags

    Below is an alphabetical listing of HTML tags, with links to the definitions above:

    - A - - B - - C - - D - - E -
    <a> <b> <caption> <dd> <em>
    <address> <base> <center> <dd>
    <basefont> <cite> <dfn>
    <blink> <code> <dir>
    <body> <dl>
    <br> <dt>
     
     
    - F - - H - - I - - K - - L -
    <font> <h1> <i> <kbd> <li>
    <h2> <img>
    <h3>
    <h4>
    <h5>
    <h6>
    <head>
    <hr>
    <html>
     
     
    - M - - N - - O - - P - - S -
    <menu> <ol> <p> <sample>
    <strong>
     
     
    - T - - U - - V - - W - - X -
    <table> <u> <var>
    <td> <ul>
    <th>
    <tr>
    <title>
    <tt>


    Maintained by C. Robert Stevens (crstevens@mail.utexas.edu)
    Last changed 10/31/95