Path // www.yourhtmlsource.comMy First Site → HTML TAG REFERENCE

HTML Tag Reference

There are quite a lot of tags in HTML, and these tags are constantly being jostled about when new versions are released. Below is a current list of all the HTML 4.01-compliant tags. If you want to learn more about any one of these tags, try clicking on it and you'll be whisked away to a tutorial in one of HTML Source's darker corners.

Clock This page was last updated on 2012-08-21

Basic Structure

The DTD (Document Type Declaration), this tells your browser which version of HTML you're using. Make sure you use the right DTD, or your page may display incorrectly.
Standard opening and closing tags for any HTML page. Enclose everything else in these. Container tag.
<!-- ... -->
A comment — whatever you put here will be skipped over by the browser.
Starts the header part of your document. Everything between these is mainly used to help your browser and search engines classify your page. Using this is optional, but recommended. Container tag.
Whatever is between these tags will appear in the blue bar at the top of the screen.
A group of tags that give page and creator information specifically to the search engines.
Changes the default link target or relative link URL, useful if the page is read on another server.
Allows you to associate stylesheets and a favorites icon to your page.
Everything visible on your page goes between these tags. Everything. Container tag.
Makes the enclosed text or image a hyperlink to another file.


Creates an ordered list, where each item is numbered in order. Container Tag.
Creates an unordered list, with each item bulleted. Container Tag.
Each list item begins with an li, and they are all placed in either an ol or ul.
Creates a definition list.
Creates a definition term.
Creates a definition, which appears below its parent term and indented from the left.


Places an image on your page
Adds a multimedia element directly into your page, allowing your browser to play it with a plug-in.
Adds a script, usually a JavaScript into your page.
Enclose anything you want displayed by browsers that do not support scripts.


Places a table on your page. Container Tag.
contains the caption of the table, the title of sorts. It will appear across the top unless specified otherwise. This tag should not be contained in a tr or td.
starts a new table row. Cells go inside this. Attributes are the same as td's.
encloses a table cell. Content goes in these.
same as table cells, but with all contents bold and aligned to the centre.
Defines the header part of a large table. Wrap the tags around the rows/cells you wish to define as the header.
Defines the main body of a complex table.
Wrap this around the footer part of your table.
Allows you to set attributes for the entire column. Each column has to be defined sequentially.


<frameset>...< /frameset>
Starts a new frame layout. When constructing a frame page, no body is used. Container Tag.
Defines a single frame within a frameset.
<noframes>...< /noframes>
If a visitor has an old browser which doesn't support frames you can leave a message or some content between these tags.
Places an inline or 'floating' frame. This can be placed anywhere on a normal page, i.e. it doesn't need to be part of a frameset.


Begins a form area. Add in any form elements you want to use between these tags. Container Tag.
Allows you to add various user input fields, like text-boxes, checkboxes, radio buttons, submit and reset buttons, depending on how you set the type attribute.
Adds a multi-lined text area, suitable for input of a larger amount of information than the single-line text box. Any text added between the tags is placed in the area when the page loads.
Sets up an empty drop-down selection box. You can add choices with the <option>...</option> tag.
Allows you to group form elements together into logical arrangements.
You can title your fieldsets with this tag.
You can make the explanatory text next to a form element into part of the clickable area with this tag, which makes selecting elements much easier.

Text Formatting

Encloses the signature and address of the author, displayed in italics.
Makes the enclosed text into bold text.
Makes the enclosed text one size bigger.
Indents the text in from both sides.
Stops the current line and goes on to the next.
Aligns the surrounded objects (anything from text or images to forms etc.) to the center.
Includes a citation, and is usually rendered as italics.
If you are including either computer or HTML code into your documents wrap these around it. It is rendered in small text.
A definition. As usual with these things, rendered in italics.
Surround distinct sections of your page in divs, primarily to align them, but many other attributes are supported and divs can be used to set up layers too.
Emphasises the surrounded text, changing it to italics.
Sets the font properties for the selected text.
Sets the text as a heading, with values of h1 (the biggest) to h6 (the smallest).
Inserts a grey horizontal line across the page.
The default tag for italics.
Implies that the text should be entered on the keyboard. It is rendered mono-spaced and small.
Tells the enclosed text not to wrap at the edge of the screen, but continue on as long as it needs.
If you need a line break in a block of text you have set in nobr, add this.
Makes the enclosed text a paragraph, with lines skipped at the top and bottom.
Displays text in fixed-width font and retains the formatting of the original text (i.e. spaces and line-breaks).
Used to mark up short, inline quotations. Some browsers will add quotation marks around the text.
<s>...</s> (or <strike>...</strike>)
Displays the text with a strike-through.
Indicates sample output from a form or program. Text is rendered in small font.
Makes the enclosed text one size smaller.
Creates emphasis for the selected text, rendered in bold.
Renders the text in subscript, which is words under the normal text. For example: this
The sister tag to <sub> above, this renders text in superscript. Like this
Renders text in fixed-width, mono-spaced font; like an old typewriter.
Displays the surrounded text underlined.