Tips on Writing Better HTML

Read Tim Berners-Lee's style guide for more detail.

  • Add some alternate text to every image, even if it's just the empty string.
    Funding provided by <img alt="Arpa" align=middle
    src="images/arpa.gif">
  • Funding provided by Arpa

  • Never say ``click here'', instead write the prose as though no link were present.
  • Click here to see the source code. THIS IS BAD!!!
    Source code is also available.

  • View your page from several browsers! Some Netscape extensions won't even be displayed under Mosaic or text-only browsers.
  • Fancy Netscape tables look empty in X Mosaic 2.5!

    You can see how your browser treats a set of example tables.

  • Keep all file URLs local. Don't force local users to go through the server by always prepending http://www.cs.cmu.edu
    <a href="http://www.cs.cmu.edu/~mwm/tutorial/tips.html">
    <a href="tips.html">
    much better!
  • Always provide some warning when an anchor leads to a very large or binary file.
  • The image and source code are available.
    The image (1400Kb) and (BINARY) source code are available.

  • Give every page a title that can be understood out of context.
  • foo.c THIS IS BAD!!
    Example source that uses the CMU-GIL library

  • Provide links back to higher-level pages.
  • Our group is part of Carnegie Mellon's School of Computer Science.

  • Put your name and a pointer to your home page at the bottom of EVERY page:
    Carnegie Mellon Computer Science mwm@cs.cmu.edu
    Next, Up, Prev,