This HTML and XHTML Quick Reference is a handy page to have bookmarked or printed. It describes the popular and main HTML tags in an easy to follow way.

Basic HTML Tags

Tag Description
<html></html> Defines a HTML document
<head></head> Defines information about the document
<body></body>

Defines the document’s body

Heading Tags

Tag Description
<h1></h1> Defines a level 1 HTML heading (biggest)
<h2></h2> Defines a level 2 HTML heading
<h3></h3> Defines a level 3 HTML heading
<h4></h4> Defines a level 4 HTML heading
<h5></h5> Defines a level 5 HTML heading
<h6></h6> Defines a level 6 HTML heading (smallest)

Text Elements

Tag Description
<p></p> Defines a paragraph
<br /> Defines a line break
<hr /> Defines a horizontal rule
<pre></pre> Defines preformatted text

Logical Styles

Tag Description
<em></em> Defines emphasized text
<strong></strong> Defines strong (bold) text
<code</code> Defines computer code

Physical Styles

Tag Description
<b></b> Defines bold text
<i></i> Defines italic text

Links, Anchors and Images

Tag Description
<img src=”" /> Defines an image
<a href=”URL”></a> Defines a HTML link

<a href=”mailto:email”></a>

Defines a mailto link (email link)
<a href=”URL”><img src=”" /></a> Defines a hyperlinked image
<a name=”tips”>Tips</a> Defines an anchor
<a href=”#tips”>Jump to Tips</a> Defines a link to an anchor on the same page

Lists

Tag Description
<ul><li>Item</li><ul> Defines an unordered list
<ol><li>Item</li><ol> Defines an ordered list
<dl>
<dt>Term</dt>
<dd>Definition</dd>
<dl>
Example of a definition list

Tables

Tag Description
<table></table> Defines a HTML table
<tr></tr> Defines a table row
<td></td> Defines a table cell
<th></th> Defines a table header cell
<table border=”1″>
<tr>
<th>someheader</th>
<th>someheader</th>
</tr>
<tr>
<td>sometext</td>
<td>sometext</td>
</tr>
</table>
Example of a HTML table

Frames

Tag Description
<frameset></frameset> Defines a set of frames
<frame src=”URL” /> Defines a frame
<frameset cols=”25%,75%”>
<frame src=”page1.htm” />
<frame src=”page2.htm” />
</frameset>
Example of HTML frames

Forms

Tag Description
<form></form> Defines a HTML form
<input type=”text” /> Defines a text input field
<input type=”password” /> Defines a password input field
<input type=”checkbox” /> Defines a checkbox
<input type=”radio” /> Defines a radio button
<input type=”submit” /> Defines a submit button
<input type=”reset” /> Defines a reset button
<input type=”hidden” /> Defines a hidden field
<select><option></option></select> Defines an option select list
<textarea></textarea> Defines a textarea
<form action=”http://www.example.com/test.php” method=”post”>



<input type=”text” name=”lastname” value=”Nixon” size=”30″ maxlength=”50″ />
<input type=”password” />
<input type=”checkbox” checked=”checked” />
<input type=”radio” checked=”checked” />
<input type=”submit” />
<input type=”reset” />
<input type=”hidden” />

<select>
<option>Apples
<option selected>Bananas
<option>Cherries
</select>

<textarea name=”Comment” rows=”60″ cols=”20″></textarea>

</form>

Example of a HTML form

Sources:
http://www.w3schools.com/html/html_quick.asp
http://www.w3schools.com/tags/default.asp