How to Write Web Pages There are many guides to writing web pages. Most of them go into more detail than this one. This one tries to be simple. You can look at other guides for more detail (see the end for suggestions) and all the clever tricks you might want to do later. This guide is different because it does the bare minimum to set up the example, then gives 2 basic rules and 1 exception early on, which are used to complete your example. This one explains the grammar as soon as possible, while most guides seem to concentrate on vocabulary. It's a different approach. As far as I can tell, many guides are wrong and that means that most web pages are incorrect, which means that they are broken for some people. I don't think people want to produce broken web pages. This guide tries to be right in the little it tells you and tries to tell you enough so that you can spot errors in other guides you use later. You can find the latest edition of this guide online at http://mjr.towers.org.uk/writing/webpages.html Lots of guides tell you to use a particular program. For this one, you only need a text editor or notepad. If you learn the basics now, you'll find it easier to tell good fancy tools and bad ones apart when you want to start using them. Start Writing Your Example Page First, write your web page as a text file, in a simple text editor such as Notepad or Emacs (not a word processor). Put notes (maybe IN CAPITALS) for where important pictures should go. Other than that, don't worry too much about the design yet. Write the main page text first. Put its title on a line by itself at the start. Save it to a file whose name ends .html (which stands for HyperText Markup Language... more on that soon). Congratulations, you've just made your first web page! Start a web browser and open the file in it. Unfortunately, while your text is there, it's all run together and probably looks nothing like your original. That's because web browsers usually display line breaks, paragraph breaks, tabs and spaces all as just a single space. The instructions on when to display things like a paragraph break are special "markup" codes in the file. The Rules/Grammar The "markup" for web pages is usually html and the latest popular version of it is xhtml 1.0 (the previous one was html 4.01). It's good to learn xhtml first because it has a few easy common rules and few exceptions to them. Rule 1: Markup looks like
and
around every paragraph (ignore any headings for now) and save again. Reload in the browser and you should see your text in paragraphs again. Then, put