HTML
HTML
</body>
</html>
HTML Basics
The doctype isn't an actual tag, but it needs to be at
start at every HTML page to tell browser which version
of HTML you're using (HTML5, in example below).
The html tag is always the first tag in the page.
<!DOCTYPE html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Head & Body
The head contains "meta" information about the
page, information that the browser needs before
rendering it.
The body contains the actual content of the page.
<!DOCTYPE html>
<html>
<head> <meta charset="utf-8">
<title>Title of your page goes here</title>
</head>
<body> Bulk of your content here. </body>
</html>
What goes in the
body?
Headlines
<h1>Header 1</h1>
To..
<h6>Header 6</h6>
Header 1
Header 2
...Header 6
Paragraphs
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
Paragraph 1
Paragraph 2
Paragraph 3
Line Breaks
<ul>
<li>Item 1</li>
<li>Item 2</li> ...
</ul>
Item 1
Item 2
...
Ordered Lists
<ol>
<li>Item 1</li>
<li>Item 2</li> ...
</ol>
1. Item 1
2.Item 2
...
Some basic tags:
<blockquote></blockquote> - defines an indented
format
<hr /> - creates a horizontal rule
Formatted Text
<em>Emphasized Info</em>
<strong>Important Info!</strong>
<i> makes text appear italicized </i>
<b> makes text appear bold</b>
<u> makes text appear underlined</u>
<sup> - makes text appear as superscript</sup>
<sub> - makes taxt appear as subscript</sub>
<strike> - makes text appear as crossed out</strike>
Images
<img
src="http://www.google.com/images/srpr/lo
go1w.png" alt="Google">
Links
<a href="http://www.google.com">Google</a>
Google