HTML is really pretty easy to learn. If you've ever used any sort of text formatting language, such as nroff or Scribe, this is the same idea. Even if you haven't, you should be able to pick this up pretty quick; it's just text with <special codes> interspersed to specify the formatting.
This page gives examples of all the basic HTML formatting codes. Read through it as a tutorial; refer back to it as a reference; use the index at the end.
The <!-- is a comment. <h2> is a medium-sized header; <h1> is the biggest header and <h4> is the smallest. <p> is a paragraph separator. <hr> is a "horizontal rule" - a dividing line. <br> is a line break.<html> <!-- Sample document skeleton. --> <head> <title>Elmer's Web Page</title> </head> <body> <h2>Elmer's Web Page</h2> <p> Text goes here. <hr> <a href="prevdoc.html">Back to previous document.</a> <br> <address><a href="mailto:efudd@mail.acme.com">Elmer Fudd <efudd@mail.acme.com></a></address> </body> </html>
Various text styles:
reference to something computerish, such as a file name
</code>Some common special characters and accents:
Note that unlike other HTML codes, these are case-sensitive.
& & < < > > « « » » © © ® ® ™ ™ ¢ ¢ £ £ ¥ ¥ µ µ § § ¶ ¶ … … ° ° ± ± ² ² ³ ³ ¼ ¼ ½ ½ ¾ ¾ × × ÷ ÷ à à á á â â ã ã ä ä å å è è é é ê ê ë ë ì ì í í î î ï ï ò ò ó ó ô ô õ õ ö ö ø ø ù ù ú ú û û ü ü ¡ ¡ ¿ ¿ ß ß æ æ ç ç ð ð ñ ñ ý ý þ þ ÿ ÿ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯
<ul>
<li>apples</li>
<li>bananas</li>
</ul>
Lists can also specify the bullet type:
<ol>
<li>oranges</li>
<li>peaches</li>
<li>grapes</li>
</ol>
Numbered lists can also specify the numbering type and starting number:
<dl>
<dt>Tag</dt>
<dd>Description. Can be multiple lines, paragraphs, sublists, whatever.</dd>
<dt>Another Tag</dt>
<dd>Another description.</dd>
</dl>
You can also leave off the tags:
<dl>
<dd>Description. Can be multiple lines, paragraphs, sublists, whatever.</dd>
<dd>Another description.</dd>
</dl>
You can use <blockquote> to indent a whole block of text:
This text is indented from the rest.Back out again; use </blockquote> to terminate a quote.You can have multiple paragraphs indented too.
You can also turn formatting completely off for an entire section, using <pre> and </pre>.
col 1 | col 2 | |
---|---|---|
row 1 | row 1 col 1 | row 1 col 2 |
row 2 | row 2 col 1 | row 2 col 2 |
<table border="1"> <caption align="bottom">Caption.</caption> <tr><td></td><th>col 1</th><th>col 2</th></tr> <tr><th>row 1</th><td>row 1 col 1</td><td>row 1 col 2</td></tr> <tr><th>row 2</th><td>row 2 col 1</td><td>row 2 col 2</td></tr> </table>
Whitespace options:
|
|
Other basic HTML resources:
View Source
!
ACME Labs / HTML Sampler