Don't use tags for anything other than what they mean.
For example, do not use the blockquote tag for indenting normal text; blockquote is for long quotations only.
Do not use the table tag for layout; use it only for tabular data.
Choose a tag with meaning rather than one without.
For example, the links in the menu are a list. Use the ul and li tags instead of the div tag (which has no meaning).
Use small for small text, not span (which has no meaning).
Using tags properly makes your page easier to use.
For example, associate text with form elements using the label tag:
<label for="email">Email</label><input type="text" name="email" id="email" />
... allows the user to focus the input or textarea or to check a checkbox by clicking on the text.
Properly declaring an acronym:
<acronym title="National Aeronautics and Space Administration">NASA</acronym>
... allows the visitor to see what the acronym means when he places the mouse over it.
Below is the complete list of XHTML 1.0 Strict tags ordered alphabetically. You can also see them ordered by function.
| <!--...--> | a comment |
| <!DOCTYPE> | the document type | REQUIRED |
| <a> | an anchor link | Recommended attributes: title |
| <abbr> | an abbreviation | Recommended attributes: title |
| <acronym> | an acronym | Recommended attributes: title |
| <address> | an address |
| <area /> | an area inside an image map | Required attributes: alt, id |
| <b> | bold text | Recommendation: use strong instead |
| <base /> | a base URL for all the links in a page | Required attributes: href |
| <bdo> | the direction of text display | Required attributes: dir |
| <big> | big text |
| <blockquote> | a long quotation |
| <body> | the body element | REQUIRED |
| <br /> | a single line break |
| <button> | a push button |
| <caption> | a table caption |
| <cite> | a citation |
| <code> | computer code text |
| <col> | attributes for table columns |
| <colgroup> | groups of table columns |
| <dd> | a definition description |
| <del> | deleted text |
| <div> | a section in a document |
| <dfn> | a definition term |
| <dl> | a definition list |
| <dt> | a definition term |
| <em> | emphasized text |
| <fieldset> | a fieldset (used to group form fields) |
| <form> | a form | Required attributes: action |
| <h1> to <h6> | header 1 to header 6 |
| <head> | information about the document | REQUIRED |
| <hr /> | a horizontal rule |
| <html> | an html document | Recommended attributes: xml:lang | REQUIRED |
| <i> | italic text | Recommendation: use em instead |
| <img /> | an image | Recommended attributes: width, height | Required attributes: src, alt |
| <input /> | an input field |
| <ins> | inserted text |
| <kbd> | keyboard text |
| <label> | a label for a form control | Recommended attributes: for |
| <legend> | a title in a fieldset |
| <li> | a list item |
| <link> | a resource reference |
| <map> | an image map | Required attributes: id |
| <meta> | meta information | Required attributes: content |
| <noscript> | a noscript section | Recommendation: always use for JavaScript, as many users browse without JavaScript |
| <object> | an embedded object |
| <ol> | an ordered list |
| <optgroup> | an option group | Required attributes: label |
| <option> | an option in a drop-down list |
| <p> | a paragraph |
| <param> | a parameter for an object |
| <pre> | preformatted text |
| <q> | a short quotation |
| <samp> | sample computer code |
| <script> | a script | Required attributes: type |
| <select> | a selectable list |
| <small> | small text |
| <span> | a section in a document |
| <strong> | strong text |
| <style> | a style definition | Required attributes: type |
| <sub> | subscripted text |
| <sup> | superscripted text |
| <table> | a table |
| <tbody> | a table body |
| <td> | a table cell |
| <textarea> | a text area | Required attributes: rows, cols |
| <tfoot> | a table footer |
| <th> | a table header |
| <thead> | a table header |
| <title> | the document title | REQUIRED |
| <tr> | a table row |
| <tt> | teletype text |
| <ul> | an unordered list |
| <var> | a variable |
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Page title</title> <link rel='stylesheet' type='text/css' href='your_stylesheet.css' /> </head> <body> <div id="menu"> <ul> <li><a href="link1.xhtml">link1</a></li> <li><a href="link2.xhtml">link2</a></li> </ul> </div> <div id="content"> <h1>Page title</h1> <p>A paragraph.</p> <p>Another paragraph.</p> </div> </body> </html>