I hope this page serves in some way as an educational tool for users learning HTML. This collection is in no way comprehensive, just some of the more common problems that I see.
Please be sure to use the HTML validation service to help find common errors in your HTML ( Yahoo lists a number of other like services). The Why Validate document explains the big picture of why HTML validation is a useful thing to do.
Advanced Web Topics
Top Ten Ways to Tell If You Have
a Sucky Home Page
Guide
s to Writing HTML Documents
Yahoo's Index of Page Design and Layout
Resources
World Wide Web Consortium
Berkeley Software Design, Inc.
(who made this site possible)
Some examples of using headers for font size control.
From an old http://www.clbooks.com/ Don't: <UL><LI><H1>...</H1></UL> Do: <UL><LI><B>...</B></UL> Don't: <UL><H3>...</H3><UL><LI>...</UL></UL&g t; Do: <H3>...</H3><UL><LI>...</UL> From an old http://www.enews.com/: Don't: <DL><DT><H2>...</H2>And you also want to avoid constructs like:
Don't: <UL><H2>...<P>...<P>...</H2></UL> Do: <H2><UL></UL>You can see from an old screen shot of www.ibm.com how this can make the words so large they wrap if the user has selected a large font size for headers (e.g., people with vision problems). The idea behind HTML is the markup should describe the logical structure of the data, not it's exact representation (therefore, headers are meant to be headers).
From an old http://found.cs.nyu.edu/: Don't: <I>...<P>...</I> Instead, terminate and restart the formatting element (validation tools will catch this kind of problem for you): Do: <I>...</I><P><I>...</I>
Don't: <A><H1>...</H1></A> Do: <H1><A>...</A></H1>
However, if you are building a private web for some specific purpose it might very well need something that is browser specific. But you should still be aware that by using browser specific features you are going to be stuck with that browser. There are also obviously the cases where public pages simply cannot be done any other way than by using some browser specific feature and by all means, do what you have to do. Basically, I'm just asking that you keep in mind your target audience.
Don't: <HEAD> <TITLE>...</TITLE> </HEAD> <HTML> <BODY> ... </BODY> </HTML>
Do: The <HTML> tag must appear first... <HTML> <HEAD> <TITLE>...</TITLE> </HEAD> <BODY> ... </BODY> </HTML>All document content must be inside the <BODY>...</BODY> tags. <TITLE> is a special case because it is not part of the content of the document, it is meta information about the document. Also note that TITLE's should be context-free (e.g., I should be able to use your TITLE to link to your document or in a bookmark without having to add any additional information).
For example, Company Information is a poor TITLE, better would BSDI Company Information.
Don't: <UL> 1. DISCOVER ... </UL> Do: <OL> <LI> DISCOVER ... </OL>
Now, compare these two examples of the above styles.
First using the
Don't style:
Note how the Do style lines up the text nicely on the continuation lines.
Also, the HTML spec recommends that headers be used in sequential order (H1, then H2, then H3, etc). Again, the reason is that these headers are meant to define the structure of the document.
Don't: <ul> <h3>Training Suites</h3> <h4>Basic-to-intermediate topics</h4> ... </ul>
The above is actually using <UL> for indention control. Sometimes you gotta do what you gotta do I guess.
Please -- Don't move URL's around if you can possibly avoid it.
I send my best to all the brave HTML authors out there who put their work online every day.
Please direct questions or feedback to <webmaster at earth.com>