(doctype)
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> ... </title>
...
</head>
<body> ... </body>
</html>
Notice the (doctype) and the "xmlns" attribute on the opening html tag. You should also include a character set meta tag in the <head> element. Recall these items from the previous page.
Wrong:
<p>here is an emphasized <em>paragraph.</p></em>
Right:
<p>here is an emphasized <em>paragraph.</em></p>
Wrong:
<PRE>Some preformatted text.</PRE>
Right:
<pre>Some preformatted text.</pre>
Wrong:
<a HREF="http://www.example.com">
Right:
<a href="http://www.example.com">
Wrong:
<p>Here is a paragraph.
<p>Here is another paragraph.
Right:
<p>Here is a paragraph.</p>
<p>Here is another paragraph.</p>
Elements with no closing tag must also be closed with a slash inside the tag:
<br> becomes <br />
<hr> becomes <hr />
<input type="text"> becomes <input
type="text" />
<img src="pic.gif" alt="">
becomes
<img src="pic.gif" alt="" />
Wrong:
<a href=http://www.example.com>example link</a>
Right:
<a href="http://www.example.com">example link</a>
Wrong:
<input type="checkbox" checked />
Right:
<input type="checkbox" checked="checked" />
Wrong:
<img src="kitten.jpg" />
Right:
<img src="kitten.jpg" alt="an evil kitten"
/>