This section is a semi-complete list of html tags, thier attributes, and any related notes. Tags that are obsolte are usually included anyway, but if they are no longer part of html 4.0 standards then a note should be made.
C : This represents the four core attributes: id, class, style, and title.
I : This represents the two internationalization attributes: lang, and dir.
E : This represents the events: OnClick, OnDblClick, OnMouseDown, OnMouseUp, OnMouseOver, OnMouseMove, OnMouseOut, OnKeyPress, OnKeyDown, and OnKeyUp.
tag | attributes | notes |
structure related | ||
<!- -...- -> | - | comment tags. hides content contained from browsers. note:some browsers consider > sign to terminate a comment |
<!doctype...> | - | prologue identifiers that should be used in html documents. with the identifier is the name of the html dtd (document type definition) that the prologue identifier is adhering to. |
<bdo>...</bdo> | C lang dir |
the bidirectional element used to turn off the default text direction |
<body>...</body> | C , I , E background bgcolor text link vlink alink onload onunload |
contains documents content |
<comment>...</comment> | - | comment tags. note: this element is only supported by the internet explorer and mosaic. |
<head>...</head> | I | contains information provided to users and serch engines |
<html>...</html> | I | used to contain the entire document |
<meta /> | I | provides information about the document |
head tags | ||
<base /> | href target |
sets the base url and target for all links |
<basefont /> | size color face |
specifies the font for the document |
<link /> | C , I , E href rel rev type media target |
links the document to other objects, such as exteranal CSS documents |
<style>...</style> | I type media title |
creates internal style sheet |
<title>...</title> | I | Gives the page a title that is displayed in the title bar. |
block and text formatting elements | ||
<abbr>...</abbr> | C , I , E | defines abbreviation |
<acronym>...</acronym> | C , I , E | define acronym |
<address>...</address> | C , I , E | special format for address and contact information (usally italic) |
<b>...</b> | C , I , E | bold text |
<big>...</big> | C , I , E | larger text |
<blockquote>...</blockquote> | C , I , E cite |
indents text on both sides |
<br /> | C , I , E clear |
creates a line break |
<center>...</center> | C lang language |
centers content |
<cite>...</cite> | C , I , E | cites a reference (usually italic) |
<code>...</code> | C , I , E | identifies a code fragment for display |
<del>...</del> | C , I , E cite datetime |
shows text as having been deleted from the document since the last change (strike) |
<div>...</div> | C , I , E align |
a division element used to add structure to a block of text |
<em>...</em> | C , I , E | emphasized text (usally italic) |
<font>...</font> | size color face |
used to change font size, face, and color. |
<h1>...</h1> - <h6>...</h6> | C , I , E align |
headers |
<hr /> | C , I , E align noshade size width |
horizontal rule |
<i>...</i> | C , I , E | italic |
<ins>...</ins> | C , I , E cite datetime |
shows text as being inserted since last update. (underline) |
<kbd>...</kbd> | C , I , E | indicates text that user would type ( teletype [or monospaced] text) |
<marquee>...</marquee> | align behavior bgcolor loop scrollamount scrolldelay truespeed width |
makes a scrolling marquee; Internet Explorer only |
<p>...</p> | C , I , E align |
creates a new paragraph. |
<pre>...</pre> | C , I , E width |
preformatted text. |
<q>...</q> | C , I , E cite |
displays short quotations that do not require paragraph breaks. |
<s>...</s> | C , I , E | strikethrough |
<samp>...</samp> | C , I , E | identifes sample output. ( teletype [or monospaced] text) |
<small>...</small> | C , I , E | smaller text |
<span>...</span> | C , I , E | used to organize the document by defining a span of text |
<strike>...</strike> | C , I , E | strikethrough |
<strong>...</strong> | C , I , E | stronger emphasis on text. |
<sub>...</sub> | C , I , E | subscript |
<sup>...</sup> | C , I , E | superscript |
<tt>...</tt> | C , I , E | teletype (or monospaced) text |
<u>...</u> | C , I , E | underlined |
<var>...</var> | C , I , E | a variable. |
<xmp>...</xmp> | C , I , E | renders text as typed. Will display HTML. obsolute tag, <pre> tag recommended as alternative. |
lists | ||
<dd>...</dd> | C , I , E | definition description |
<dl>...</dl> | C , I , Ecompact | definition list |
<dt>...</dt> | C , I , E | definition term |
<li>...</li> | C , I , E type value |
list item |
<ol>...</ol> | C , I , E type compact start |
ordered list |
<ul>...</ul> | C , I , E type compact |
unordered list |
tables | ||
<caption>...</caption> | C , I , E align |
displays table caption |
<col /> | C , I , E span width align char charoff valign |
groups individual columns within column groups in order to share attribute values. |
<colgroup>...</colgroup> | C , I , E span width align char charoff valign |
defines a column group. |
<table>...</table> | C , I , E align bgcolor width cols border frame rules cellspacing cellpadding |
creates table |
<tbody>...</tbody> | C , I , E align char charoff valign |
defines the table body section. |
<td>...</td> | C , I , Eaxis axes nowrap bgcolor rowspan colspan align char charoff valign |
table data (defines cell's content.) |
<tfoot>...</tfoot> | C , I , E align char charoff valign |
table footer |
<th>...</th> | C , I , E axis axes nowrap bgcolor rowspan colspan align char charoff valign |
table header (defines cell contents of table header) |
<thead>...</thead> | C , I , E align char charoff valign |
defines the head section of table |
<tr>...</tr> | C , I , E align char charoff valign bgcolor |
defines table row |
forms | ||
<button>...</button> | C , I , E name value type disabled tabindex onfocus onblur |
creates button |
<fieldset>...</fieldset> | C , I , E | groups related controls (new to HTML 4.0, IE 4.0+) |
<form>...</form> | C , I , E action method enctype onsubmit onreset target accept-charset |
creates a form |
<input /> | C , I , E type name value checked disabled readonly size maxlength src alt usemap align tabindex onfocus onblur onselect onchange accept |
defines controls used in forms |
<isindex /> | C , I | prompts the user for input (deprecated) |
<label>...</label> | C , I , E for disabled accesskey onfocus onblur |
labels a control |
<legend>...</legend> | C , I , E align accesskey |
assigns a caption to a fieldset (new to HTML 4.0, IE 4.0+) |
<optgroup>...</optgroup> | C , I , E disabled label |
used to group form elements within a <select> element |
<option>...</option> | C , I , E selected disabled value |
specifies choices in a <select> element. |
<select>...</select> | C , I , E name size multiple disabled tabindex onfocus onblur onselect onchange |
creates choices for the user to select |
<textarea>...</textarea> | C , I , E name rows cols disabled readonly tabindex onfocus onblur onselect onchange |
creates an area for user input with multiple lines |
embedded & scripts | ||
<applet>...</applet> | codebase archive code object alt name width height align hspace vspace |
includes a java applet (deprecated in favor of <object>) |
<area /> | shape coords href target nohref alt tabindex |
used to define links and anchors. |
<img /> | C , I , E src alt align height width border hspace vspace usemap ismap |
includes an image in document |
<map>...</map> | C | used to create client side image map |
<noscript>...</noscript> | - | provides alternative content for browsers unable to execute a script |
<object>...</object> | C , I , E declare classid codebase data type codetype standby align height width border hspace vspace usemap shapes name tabindex |
includes an object |
<param /> | name value valuetype type |
initializes an object |
<script>...</script> | type language src |
the element contains client-side scripts that are executed by the browser |
links | ||
<a>...</a> | C , I , E charset name href target rel rev accesskey shape coords tabindex |
anchor (link) |
frames | ||
<frame /> | name src frameborder marginwidth marginheight noresize scrolling |
defines a frame |
<frameset>...</frameset> | rows cols onload onunload |
defines the layout of frames within a window |
<iframe>...</iframe> | name src frameborder marginwidth marginheight scrolling align height width |
creates inline frame |
<noframes>...</noframes> | - | contains alternative content when frames are not supported. |