Chapter 18: HTML Style Basics
- Probably the #1 rule is that you should not use "Click here" to point to a document. It is best if the text of the link actually has something to do with the content. It also makes bookmarks/hotlinks work much better.
- Make sure that all graphics and client side image maps on your pages have alt tags for use by people who browse without graphics. Definitely make sure that anything a visitor needs to use to navigate your site is readable in all browsers.
- Try to use browser specific tags only when appropriate on your web sites- and try to provide alternatives for browsers that don't support these tags (e.g. make sure to provide a noframes option for people without frames capable browsers.)
- Don't overload your pages with graphics- if you need to use them to enhance the look of your pages, or if they are an integral part of the content on your site, go ahead, but put image sizes on the graphics tags so that they won't slow down loading, and try to reduce the size of the graphics you use as much as possible (the Bandwidth Conservation Society has useful information on this).
- Don't make everything a header just because you want it to be bold, this is not portable and looks really awful unless the user has exactly the configuration you use.
- Don't use Netscape (or any other browser specific markup, including MS Internet Explorer) specific markup in public documents. As Netscape proved against Mosaic the life of a browser only exists until the next better browser comes along. Why do all that work only to have to go back in a year or so and redo everything. 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.
- And finally, the biggest style error I see (which actually has little to do with HTML) is that people do not pick URL's for their pages that are permanent. How many links have you tried to follow where it ended up that the other end was simply gone or worse, the author had simply renamed the page and makes you hunt for it.
Some basic tips for creating good HTML:
The topic of creating great web pages is a vast one, and has much to do with design and layout. A few of the best resources for learning more about this topic are:
- Use a solid background for pages that contain large amounts of text. A solid background is always a good choice for your web pages. It provides an easy reading surface for your reader and it doesn't distract from the main focus of your page: Your text! When using a solid background, be sure to use a complementary color for your text. For instance, light blue text does not stand out well on a white background.
- When using frames, always specify a TARGET of "_new" for links that go off your site. That way your visitors won't get stuck in one of your frames.
- When using image maps, provide text links below the map as well, for users who have turned the display of images off. Also, remember to make your image map graphic as small (in terms of file size) as possible.
- Use "height" and "width" attributes in the "img" tag when displaying images, so that the user does not need to wait for the image to load before seeing text further down on the page.
- Include some way for visitors to contact you, i.e. an email address or a feedback form.
- Be original!
Yale Style Guide http://info.med.yale.edu/caim/manual/ Composing Good HTML http://www.cs.cmu.edu/~tilt/cgh/ What Makes a Good Home Page http://werbach.com/web/page_design.html
Go To Chapter 19
Return to index