Show Menu
Cheatography

HTML Cheat Sheet (DRAFT) by

A simple element HTML

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

HTML4 Document Outline

<!D­­OC­T­Y­PE>
Version of (X)HTML
<ht­­ml>
HTML document
<he­­ad>
Page inform­­ation

HTML4 Comments

<!-- Comment Text -->

HTML4 Tables

<ta­­bl­e>
Table
<th­ead>
Table header
<tb­­od­y>
Table body
<co­­lg­r­o­up>
Column group
<co­­l>
Column
<tr>
Table row
<th>
Header cell
<td>
Table cell

HTML4 Page Inform­­ation

<me­­ta>
Meta data
<ti­­tl­e>
Title
<li­nk>
Relevant resource
<link rel="st­yle­she­et" href="s­tyl­es.c­ss­">
<sc­rip­t>
Script resource
<script src="my­scr­ipt­s.j­s"><­/sc­rip­t>

HTML4 Core Attributes

class
style
id
title
1) Class and ID can be used to design the element
2) ID can be use to call input value
 

HTML4 Document Structure

<h1> to <h6>
Headings
<di­v>
Page section
<sp­­an>
Inline section
<p>
Paragraph
<br>
Line break
<hr>
Horizontal line

HTML4 Lists

<ol>
Ordered list
<ul>
Unordered list
<li>
List item

HTML4 Images

<im­g>
image
<img src="ic­on.j­pg­" alt="my­ico­n" width=­"­500­" height­="60­0">

HTML4 Links

<a href="">
Page link

HTML4 Forms

<fo­rm>
Form
<la­bel>
Input label
<in­put>
Form input
<se­lec­t>
Drop down
<op­tio­n>
Drop down option
<ou­tgr­oup>
Group of option
<te­xta­rea>
Large text input
<bu­tto­n>
Button

HTML4 Events

Window Events
onload
onunload
Form Events
onchange
onselect
onfocus
onsubmit
Keyboard Events
onkeydown
onkeyup
onkeypress
Mouse Events
onclick
onmouseout
ondblclick
onmous­­eover
onmous­­edown
onmouseup
onmous­­emove