HTML Cheat Sheet
HTML Cheat Sheet
<!DOCTYPE>
HTML 4.01
o <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
o <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
o <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
XHTML 1.0
o <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
o <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
o <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<head>
<title>title of the document</title>
<meta http-equiv=”content-type” content=”text/html; charset=UTF-8”>
</head>
<body>
<!--
Visible content of the document goes here
-->
</body>
</html>
<TAG-NAME ATTRIBUTE=”VALUE”></TAG-NAME>
TAG-NAME = name of the HTML element
Attributes
o Common attributes are: title(tooltip), id(unique identifier), class(class
identifier for stylesheet use) and style(for inline stylesheet)
Text markup
<strong> strong emphasis
<em> emphasis
<blockquote> long quotation
<q> short quotation
<abbr> abbreviation
<acronym> acronym
<address> address
<pre> pre-formatted text
<dfn> definition
<code> code
<cite> citation
<del> deleted text
<ins> inserted text
<sub> subscript
<sup> superscript
<bdo> text direction
List elements
Table elements
<table> table
<caption> caption
<thead> table header
<tbody> table body
<tfoot> table footer
<colgroup> column group
<col /> column
<tr> table row
<th> header cell
<td> table cell
Image element