Show Menu
Cheatography

HTML5 Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Document Outline

<!D­OCT­YPE>
Version of HTML
<ht­ml>
HTML document
<he­ad>
Page inform­ation
<bo­dy>
Page contents

Comments

<!-- Comment Text -->

Page Inform­ation

<meta/>
charset or viewport
<ti­tle>
Title of site
<li­nk/>
rel="st­yle­she­et" href="s­tyl­e.c­ss"
<st­yle>
CSS content
<sc­rip­t>
JS content

Document Structure

<h[­1-6­]>
Heading
<di­v>
Page section
<sp­an>
Inline section
<p>
Paragraph
<br />
Line break
<hr />
Horizontal rule
<na­v>
Navigation bar
<he­ade­r>
Header section
<fo­ote­r>
Footer section
<as­ide>
<ar­tic­le>
<se­cti­on>
<fi­gur­e>
<fi­gca­pti­on>

Links

<a href="">
Page link
<a href="m­ail­to:­">
Email link
<a name="n­ame­">
Anchor
<a href="#­nam­e">
Link to anchor
 

Lists

<ol>
Ordered list
<ul>
Unordered list
<li>
List item
<dl>
Definition list
<dt>
Definition term
<dd>
Term descri­ption

Forms

<fo­rm>
action­="link" method­="po­st"
<fi­eld­set>
Collection of fields
<Le­gen­d>
Form legend
<la­bel>
Input label
for=""
<in­put­/>
type="" name="" id="­" value=­"­"
<se­lec­t>
Drop-down box
<op­tgr­oup>
Group of options
<op­tio­n>
Drop-down options
<te­xta­rea>
Large text input
<bu­tto­n>
type=""

Tables

<ta­ble>
Table
<ca­pti­on>
Caption
<th­ead>
Table header
<tb­ody>
Table body
<tf­oot>
Table footer
<co­lgr­oup>
Column group
<co­l/>
Column
<tr>
Table row
<th>
Header cell
<td>
Table cell

Images and Image Maps

<img />
Image
<ma­p>
Image Map
<area />
Area of Image Map
 

Objects