It's easy! Remember that all you're doing is marking up text --- adding marks
to a text that describe its structure or format. The markup is done using tags
which are enclosed in angle-brackets (less-than and greater-than symbols). For
example, <title>
marks the beginning of the title of
a document. To mark the end of a structure, the corresponding close-tag is used,
e.g. </title>
. To look at the markup used in this
document (if you're feeling brave), choose → from the Internet Explorer or Firefox menu.
Here's an example of a truly minimalist web page:
Example 2.2. A minimalist web page
<html> <head> <title>My first web page</title> </head> <body> <h1>My First Web Page</h1> <p>HTML is quite easy to learn.</p> </body> </html>
Note that for each opening tag there is also a closing tag, and that tags are nested rather than overlapped. Also note that the document is divided up into logical sections; the head and the body. There are rules as to which tags can appear in which section, and which tags can be nested inside which others. These rules are defined in the standards, but the easiest way to discover them is by looking at other web pages, and by validating your own pages (see below). Trial and error is the key to writing good web pages!
If you're itching to have a go, take a look at the 10 minute guide which will get you started. Use Notepad to write your page--writing it in Wordpad or Word will cause problems because they try to do clever tricks as soon as they think you're writing HTML.