8. Closed Elements
BAD
<p>Paragraph 1
<p>Paragraph 2
<br>
<hr>
<img src=“pic.jpg”>
HAPPY FUN TIME
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<br />
<hr />
<img src=“pic.jpg” />
9. lowercase elements
BAD
<P> another
paragraph
with an image
<Img Src=“pic.jpg” />
</p>
HAPPY FUN TIME
<p> another
paragraph
with an image
<img src=“pic.jpg” />
</p>
10. HAPPY FUN TIME
<table width=“100%”>
</table>
<input checked=“checked” />
<option selected=“selected”>
</option>
BAD
<table WIDTH=100%>
</table>
<input checked>
<option SELECTED>
</option>
More syntax
Attribute names must be lowercase, their
values quoted, and no “minimization”
11. DOCTYPE
Only really have to worry about this if
you create the page from scratch
Don’t really worry about what
everything means except for…
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/
xhtml1-transitional.dtd">
12. Now What?
XHTML Cheat Sheet v1.03 -
http://floele.flyspray.org/htmlcheatsheet.pdf
Official HTML 4 page –
http://www.w3.org/TR/html4/
Official list of elements (HTML 4) -
http://www.w3.org/TR/html4/index/elements.html
Official list of attributes (HTML 4) -
http://www.w3.org/TR/html4/index/attributes.html
Official XHTML 1 page –
http://www.w3.org/TR/xhtml1/
13. Who am I?
C. Todd Barber
Webmaster
University of Tennessee Health Science Center
Memphis, TN 38163
http://www.utmem.edu
Also at
http://ctbarber.com
http://twitter.com/ctbarber