This is a draft cheat sheet. It is a work in progress and is not finished yet.
HTML Setup
HTML Doctype Declaration |
<!DOCTYPE html> |
Head tag |
<head></head> |
Title tag |
<title></title> |
Style tag |
<style></style> |
Body tag |
<body></body> |
Comment |
<!--example comment--> |
HTML Character Entity References
< |
< |
> |
> |
& |
& |
© |
© |
non-breaking space |
&-nbsp; (without dash) |
" |
" |
Character entities help avoid rendering issues which conflict with HTML, safeguard against more limited character encoding and provide characters not available on a keyboard
Heading Elements
Heading One |
<h1></h1> |
Heading Two |
<h2></h2> |
Heading Three |
<h3></h3> |
Paragraph Text |
<p></p> |
|
|
List Elements
Ordered List |
<ol></ol> |
Unordered List |
<ul></ul> |
List Item |
<li></li> |
Links
Hyperlink tag |
<a href="http://example.com" target="tab type" title="title">Clickable Text</a> |
Hyperlink Reference |
href="same-directory.html" OR href="http://example.com" OR href="#example" |
Title |
Link description which displays on hover |
New Window/Tab (target) |
_blank |
Anchor tag |
<a name="example">Example</a> |
Tag ID (section, h1, h2, p, etc.) |
<tag id="example">Example</tag> |
Images
Image tag |
<img src="example.com/image" width="x" height="y" |
Source |
src="https://example.com/image |
Width |
width="x" |
Height |
height="y" |
Alt Tag (for screen readers) |
alt="Example description" |
|