Show Menu
Cheatography

HTML BASICS Cheat Sheet (DRAFT) by

HTML5 BEGINNERS

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

NEED TO KNOW TAGS

<!d­oct­ype>
Document type
<ht­ml>
Create HTML document
<he­ad>
Inform­ation about the document
<bo­dy>
The body element
<ti­tle>
Document Title
<h1> </h­1>
Creates headli­nes­;H1­=la­rgest
<h2> </h­2>
Creates headlines
<h3> </h­3>
Creates headlines
<h4> </h­4>
Creates headlines
<h5> </h­5>
Creates headlines
<h6> </h­6>
Creates headli­nes­;H6­=sm­allest
<p> </p>
Creates a new paragraph
<br>
Insert line break
<ma­in>
Main content are of HTML doc

CREATING LISTS

<ul>
Creates an unordered list
<dl>
Creates a definition list
<li>
List Item
<me­nu>
Menu list
<ol>
Ordered list
<op­tio­n>
Option in a dropdown list
<se­lec­t>
Selectable list
 

TEXT TAGS

<st­ron­g>
Creates bold text
<em>
Creates italicised text
<tt>
Creates typewr­ite­r-style text
<co­de>
Used to define source code
<ci­te>
Create a citation
<sm­all>
Small text
<bd­o>
Display text direction
<co­de>
Computer code text
<pr­e>
Reform­atted text
<ma­rk>
Marked text
<in­s>
Insert text
<kb­d>
Keyboard Text
<rt>
Ruby Text
<su­b>
Subscribed Text
<ab­br>
Abbriv­ation

CREATING TABLES

<ta­ble>
Creates a table
<tb­ody>
Table body
<tf­oot>
Table footer
<th>
Table header
<tr>
Table row
<td>
Table cell
 

CREATING FORMS

<fo­rm>
Defines a form
<select name=?>
Creates a pulldown menu
<op­tio­n>
an option in a drop down list
<te­xtarea name=?>
Creates a text box area.
<input type="r­adi­o">
Input Radio button
<input type="t­ext­">
Creates a one-line text area.
<input type="s­ubm­it" value=­?>
Creates a Submit button.Value is set
<input type="r­ese­t">
Creates a Reset button

ADDING LINKS

<a>
Creates Hyperlink
<na­v>
Navigation links
<a name="N­AME­">
Creates target location in a document
<a href="#­NAM­E">c­lic­kable text</­a>
Creates a link to target location
<a href="U­RL">­cli­ckable text</­a>
Hyperlink to URL

BASIC GRAPHICS

<hr>
Horizontal rule
<hr size=?>
Sets size of rule
<hr width=­?>
Sets width of rule
<img src="UR­L" />
Adds image, in file at URL
<img src="UR­L" height­=?>
Sets height if image
<img src="UR­L" width=­?>
Sets width if image