Cafe LaTe Home
Contents
Background
Getting Started
Images
Links
Tables
Lists
Resources
arrow Tag Index
HTML Tag Index




books   The tags listed on this page are only those tags which are covered in the tutorial. This is not a comprehensive list. There are many more HTML tags than just those listed here. This tutorial is targeted at beginners, and covers only basic tags.

   Tags or new attributes introduced for the first time in a given lesson are colored red. Only the newly introduced attributes of tags already learned are colored red. When the tag itself has already been covered in a previous lesson, it appears in black in the Tag/Attributes column.. For details on using the tags, click the Lesson links.


HTML Tag Index

Lesson Tag/Attributes Description
Lesson 2-1 html /html The HTML (HyperText Markup Language) tag marks the beginning and end of an HTML document.
head /head The HEAD tag is a container for various kinds of information about the document. HEAD is not part of the BODY.
title /title The TITLE tag is a container for the title bar text. The title bar text appears in the title bar, not the page itself. The TITLE element is placed inside the HEAD container.
body /body Everything that appears on the page is placed within the BODY tag container.

Lesson 2-2

body bgcolor="#nnnnnn"

The BGCOLOR attribute of the BODY tag sets the background color of a web page. "nnnnnn" represents the color value in hex code. A pound sign (#) is placed before the hex code.

Lesson 2-3

hn align="left/center/right"/hn
    Headings come in six sizes H1-H6, H1 being the largest size. Headings can be aligned with the ALIGN attribute, which takes a LEFT, CENTER, or RIGHT value.
Example: h2 align="center"Headline/h2

Lesson 2-4   Multiple spaces in source files are ignored by browsers. When you need to add spaces, use the non-breaking space code -  
pparagraph text/p The p/p tag container creates an unindented paragraph with one blank line above and one below.
br The line break tag br breaks to the next line, but does not insert a blank line. However, you can create a blank line by using two break tags.

Lesson 2-5

bbold/b Makes text bold.
iitalic/i Italicizes text.
bigbig/big Increases the relative font size of text.
smallsmall/small Decreases the relative font size of text.
supsuperscript/sup Changes text to superscript.
subsubscript/sub Changes text to subscript.
strikestrikeout/strike Places a strikeout line over text.
ttteletype/tt Changes text to a monospaced font that looks like old teletype text.
uunderline/u Underlines text. Avoid using underlined text if at all possible because underlined text is used for links.
blinkblink/blink Makes text blink. This tag works only in Netscape. Don't use this tag! Many people hate blinkiing text, and will not hesitate to send you email telling you so.

Lesson 2-6 font size="±n"text /font Many text attributes can be set with the font tag. Size is set using the size attribute of the font tag. Size is set using "+" or "-" values relative to the size of the surrounding font.
font color="#hexcode"text
/font
Sets the color of text. The color attribute is followed by a color value given in hexadecimal code. A pound sign (#) is placed before the hex code.
font face="FontName"text
/font
The font face is set using the face attribute of the font tag.. Common font faces used on the Internet include: Times New Roman, Arial, Arial Black, Courier, Garamond, and Modern. If the name of a font has spaces in it (for example, Arial Black), then you must use the space in your face value.

Lesson 2-7

hr size="n pixels" width="n pixels" align="left/center/right"
  hr draws a line (horizontal rule) across the page. If no attributes are set, the line is drawn across the entire page from left to right. The thickness of the line in pixels can be set with the size attribute. The length of the line in pixels (or as a percentage of the width of the screen) is set with the width attribute. If the width is set to less than the width of the screen, the align attribute can be used to align the line left, right, or center.
div align="left/center/right"
/div
The div tag sets off an area of the page (a division). Certain attributes can then be applied to that division of the page. One of the most common uses for div is for centering. Everything contained in a pair of div/div tags can be aligned left, right or center.

Lesson 3-1 body background="URL/path/filename"
       An image file can be used for a page background by adding the background attribute to the body tag.. If a file name value is used by itself, then the image file must be in the same folder as the web page file. If the image file is located somewhere else, its location may be given as either a relative path, or an absolute URL. Background graphics are tiled on the page. If a background graphic and a background color are both set, the graphic will be on top, the color below.

Lesson 3-2 img src="filename" alt="alt text" width="n" height="n" border="n"
       Images are placed on the page with the IMG tag. The SRC attribute tells the browser the location and name of the image file. The text value of the ALT attribute appears on screen when the user moves the mouse over the image. ALT text is also used by page reading software for visually impaired users. The WIDTH and HEIGHT attributes set the width and height of the image in pixels. Setting WIDTH and HEIGHT attributes makes the page load faster. The thickness in pixels of a square border around an image can be set with the BORDER attribute. Excepting some older browsers, if the BORDER attribute is not set, there will be no border.

Lesson 3-3 img align="left/right/top/middle/bottom"
    The ALIGN attribute of the IMG tag does not set the position of the image on the page. Rather, it controls the way text flows around an image. See Lesson 3-3 for details.

Lesson 4-1 a href="URL/path/filename"
link text/a
Hypertext links are created using the anchor tag a. Links to pages on other sites are called external links. Link destinations are set with the HREF attribute of the anchor tag. The full (absolute) URL of the page is used for the value of the HREF attribute. Text placed between the opening and closing anchor tags becomes underlined link text on the page.

Lesson 4-2 a href="path/filename"
link text/a
Links to other pages on your own site are called local links. Full URLs can be used as the value of the HREF attribute for a local link, but relative links are more common. A relative value sets the destination relative to the to the location of the webpage itself. If the link destination page is located in the same folder as the link source page, then all that is needed is the filename. If the destination page is in a different folder, then the path must also be included.

Lesson 4-3 a name="anchor name"/a
a href="#anchor name"
link text/a
Links to different parts within a single page are called internal links, or bookmark links. The destination of an internal link is set with the NAME attribute of the anchor tag. Any number of link destinations can be set on the same page just by giving each a different name. Nothing is usually placed between the opening and closing destination anchor tags. The links to these destinations are called source links. The HREF values of internal links are simply the destination link names preceded by a pound sign (#).

Lesson 4-4 a href="mailto:email@address" link text/a
    When links to email addresses are clicked, the user's email software is started up, and the email address in the link is automatically used as the destination adderess (placed in the [TO: ] box). Email links are created with an anchor tag using mailto:email@address as the value of the HREF attribute.

Lesson 5-1 table
tr
thheader text/th
tddata/td
captioncaption text/caption
/tr
/table
Tables are created using the TABLE tag. All other table related tags are placed between the opening and closing TABLE tags. Table Rows are created with the TR tags. Table cells are created with the TD (Table Data cell) tags, which are placed between a pair of opening and closing TR tags. A header row with bold text can be created with Table Header cell TH tags inside of a pair of TR tags.. Finally, a caption for the table can be created with the CAPTION tags. CAPTION tags can be placed anywhere between the opening and closing TABLE tags.

Lesson 5-2    border="n pixels" The thickness in pixels of the outer border of a table is set with the BORDER attribute of the TABLE tag. The BORDER attribute is used only with the TABLE tag.
   cellspacing="n pixels" The CELLSPACING attribute sets the thickness in pixels of a table's lines. The CELLSPACING attribute is used only with the TABLE tag.
   cellpadding="n pixels" The CELLPADDING attribute sets the distance in pixels between the text or other data in a table cell and the lines of the cell. The CELLPADDING attribute is used only with the TABLE tag.
   align="left/center/right" When the ALIGN attribute is used with the TABLE tag, it aligns the entire table on the page. When ALIGN is used as an attribute of the TH, TR, or TD tags, it aligns the text (or other data) contained by the tags within the cells.. When ALIGN is used with the CAPTION tag, it takes either a top or bottom value.
   width="n pixels" The WIDTH attribute can be used with the TABLE, TH, or TD tags to set the width of table cells, or the width of the entire table. WIDTH is usually set in pixels, but may also be set using percentages.
   height="n pixels" The HEIGHT attribute can be used with the TABLE, TR, TH, or TD tags to set the height of table rows or cells, or the height of the entire table. HEIGHT is usually set in pixels, but may also be set using percentages.
   bgcolor="#hexcode" The background colors of tables, table rows, or individual table cells is set using the BGCOLOR attribute of the TABLE, TR, TH, or TD tags. Use a pound sign (#) followed by a color hex code as the value of BGCOLOR.

Lesson 5-3    colspan="n" Table cells beside one another can be joined with the COLSPAN attribute of the TD tag. The value of COLSPAN is, of course, the number of columns you want the cell to span.
   rowspan="n" Likewise, table cells above or below one another can be joined with the ROWSPAN attribute of the TD tag. The value of ROWSPAN is, of course, the number of rows you want the cell to span.

Lesson 6-1 ul type="disk/square/circle"
liitem text/li
/ul
   Unnumbered, bulleted lists are called unordered lists in HTML. Unordered lists are created with the UL tag. The UL tag may take a type attribute. The type attribute sets the type of symbol used for the bullets in a list. Each item in the list is enclosed in a pair of LI (List Item) tags, but the closing LI tag is optional.

Lesson 6-2 ol type="1/A/a/I/i"
liitem text/li
/ol
Numbered lists are called ordered lists in HTML. Ordered lists are created with the OL tag. The OL tag may take a type attribute. The type attribute sets the type of symbol used to number the list items. Each item in the list is enclosed in a pair of LI (List Item) tags, but, again, the closing LI tag is optional.

Lesson 6-3 dl
dtterm/dt
dddefinition/dd
/dl
Definition Lists are lists formatted like a list of words and their explanations. Definition lists are often used for glossaries. A definition list is created with the DL tag. LI tags are not used in definition lists. The terms or words to be defined or explained are placed inside a set of DT (Definition Term) tags. The explanations or definitions themselves are put inside DD (Definition Data) tags pairs.


Authoring
Resources

   This tag index covers only the bare essentials of HTML tags. Only the tags covered in this tutorial are explained. If you would like to continue your study of HTML, there are many good books on the market. See the Authoring Resources page for a few recommendations.



 


Authoring Resources HTML Tutor Home Page
 

[Cafe LaTe Home] [Chat Lounge] [Community Center] [Newspaper] [HTML Tutor]



Last revision: 2002/03/04, Copyright © The Three Cities Workshop