How to write HTML files

This is the document which describes what HTML is and how it works. If you're reading this through a WorldWideWeb (W3) client (browser) program, then you already know how to get at it: if you're reading it on paper, then you should go to the end, where there are some pointers about how to access this stuff online.

HTML stands for Hypertext Markup Language, and it's a specification for making hypertext documents. Hypertext is a concept which allows one piece of text to crossreference other pieces of text, either in the same document or in other documents on a computer network (in the case of W3, on the Internet). HTML is written in SGML (Standard Generalized Markup Language) which is the international standard (ISO 8879) for text markup.

Note: This document refers to the original HTML specification, with some small additions. You can use anonymous ftp to get a copy of the HTML Document Type Description (html.dtd), which is the official IETF draft. The additions referred to are marked in this document with a `@' symbol: they are currently under discussion for inclusion in the final version of the HTML DTD, which will then be frozen. Future development will concentrate on HTML+, a more advanced version with additional features, which are still being worked on (details on the current state of HTML+ are also available).


Where do I start?

This document is divided into three parts (like Cæsar's Gaul):

  1. Beginner's introduction: simple documents
  2. Adding more: lists, links and other structure
  3. Advanced features
You should probably have a computer available if you want to experiment while you learn. If you just want help on a specific topic, there's an outline index.


Software

If you are going to be creating a lot of HTML documents, I recommend strongly that you get an SGML-compliant editor for your computer. There are lots around, and some of them are free, and they will help ensure your files are constructed correctly. Without one, you may have a lot of extra typing to do! Two of the most popular are:

But there are plenty of others, and there are also several conversion programs to filter text from other packages.


How to access W3 online

Here's how to get started with online access to the Web. You need

  1. A computer (terminal, PC, Mac, workstation) with a direct connection to the Internet;
  2. A copy of a suitable client browser program. Among the most popular are:
  3. A little patience :-)
If you have a computer center or person responsible for networking, ask them first if they already have a copy of any of the above programs already installed. If so, you're in luck: if not, you'll have to retrieve one of them by anonymous ftp and install it on your computer. A little foreknowledge of computers and networking is required, but not much.

In extreme circumstances you can retrieve individual documents by electronic mail, but this is slow. To do so, you need to know the URL (Universal Resource Locator) of the file you want. This is a kind of extended file specification, in the format:

http://machine.site.net/directory/subdirectory/filename.html for example (this file): http://www.ucc.ie/info/net/htmldoc.html When you know the URL you want, send a one-line mail message to webmail@www.ucc.ie saying
GO url
where you replace the url witht he full URL of the document, for example: GO http://www.ucc.ie/info/net/htmldoc.html Don't include any other text in the message.