HTML Cheat Sheet

 

Document Outline

<!DOCTYPE> Version of (X)HTML
<html>….</html> HTML document
<head>….</head> Page information
<body>….</body> Page contests

 

Comments

<!– Comment Test –>

Page Information

<base /> Base URL
<meta /> Meta data
<title>….</title> Title
<link /> Relevant resource
<style>….</style> Style resource
<script>….</script> Script resource

Document Structure 

<h1>….</h1> to <h6>….</h6> Heading
<div>….</div> Page section
<span>….</span> Inline section
<p>….</p> Paragraph
<br> Line break
<hr> Horizontal rule

Links 

<a href=””> Page link
<a href=”mailto:”> Email link
<a name=”name”> Anchor
<a href=”#name”> Link to anchor

Text Markup

<strong>….</strong> Strong emphasis
<em>….</em> Emphasis
<blockquote>….</blockquote> Long quotation
<q>….</q> Short quotation
<abbr>….</abbr> Abbreviation
<acronym>….</acronym> Acronym
<address>….</address> Address
<pre>….</pre> Pre-formatted text
<dfn>….</dfn> Definition
<code>….</code> Code
<cite>….</cite> Citation
<del>….</del> Deleted text
<ins>….</ins> Inserted text
<sub>….</sub> Subscript
<sup>….</sup> Superscript
<bdo>….</bdo> Text directio

List

<ol>….</ol> Ordered list
<ul>….</ul> Unordered list
<li>….</li> List item
<dl>….</dl> Definition list
<dt>….</dt> Definition term
<dd>….</dd> Term description

Forms

<form>….</form> Form
<fieldset>….</fieldset> Collection of fields
<legend>….</legend> Form legend
<label>….</label> Input label
<input>….</input> Form input
<select>….</select> Drop-down box
<optgroup>….</optgroup> Group of options
<option>….</option> Drop-down options
<textarea>….</textarea> Large text input
<button>….</button> Button

Tables

<table>….</table> Table
<caption>….</caption> Caption
<thead>….</thead> Table body
<tbody>….</tbody> Table body
<tfoot>….</tfoot> Table footer
<colgroup> Column group
<col /> Column
<tr>….</tr> Table row
<th>….</th> Header cell
<td>….</td> Table cell

 

Images and Image Maps

<img />
Image

<map>….</map>
Image Map

<area />
Area of image map

 

Common Character Entities

&#34;   ”   Quotation mark
&#38;   &   Ampersand
&#60;   <   Less than
&#62;   >   Greater than
&#64;   @  “At” symbol
&#128;  €   Euro
&#149;  •   Small bullet
&#153;  ™  Trademark
&#163;  £   Pound
&#160;       Non-breaking space
&#169;  ©  Copyright symbol

Objects

<object>….</object>
Object

<param />
Parameter

Empty Elements

<area />
<base />
<br />
<col />
<hr />
<img />
<input />
<link />
<meta />
<param />

Core Attributes

Class: id      Style: title
Note: Core attributes may not be used in base, head, html, meta, param, script, style or title elements.

Language Attributes 

dir       lang
Note: Language Attributes may not be used in base, br, frame, framest, hr, iframe, param or script elements.

Keyboard Attributes

accesskey     tabindex

Window Events

onLoad    onUnload

Form Events

onBlur        onReset
onChange   onSelect
onFocus     onSubmit

Keyboard Events

onKeydown   onKeyup
onKeypress

Mouse Events

onClick    onMouseout
onDblclick    onMouseover
onMousedown   onMouseup
onMousemove

Download

 92 total views,  1 views today