WWW

More detailed information about HTML

If you wish to get the best out of HTML, some knowledge of tags is useful.

This is a tag <TAG> Notice that the tag is surrounded by greater than and less than signs.
Tags usually come in pairs, with something in the middle <TAG>Some text</TAG>
Notice the backslash in the second tag, which defines it as the "end" tag of a pair.
Tags sometimes have attributes. <TAG attribute=value>Some text</TAG>
For example <IMG SRC="http:/www.mysite.co.uk/picture.gif" ALT="Picture of me">
ALT="Picture of me" is the attribute here.

Let's put some of this into practice, then...


The "HTML" tag tells the browser that it is dealing with an HTML document. <HTML>
</HTML>
The document is then divided up into a "header" and a "body". <HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>
The header contains the title, which usually appears in the top margin of the browser. <HTML>
<HEAD>
<TITLE>
Anywhere Surgery homepage
</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
Let's move on to the body of the document.
We can now add a heading for the page in a font size between 1 (largest) and 6 (smallest). Lets go for the largest.
<HTML>
<HEAD>
<TITLE>
Anywhere Surgery homepage
</TITLE>
</HEAD>
<BODY>
<H1>
Welcome to Anywhere Surgery
</H1>
</BODY>
</HTML>
Now we can add some descriptive text, including the "paragraph" tag (note that this is one of the tags that does not have to be paired). <HTML>
<HEAD>
<TITLE>
Anywhere Surgery homepage
</TITLE>
</HEAD>
<BODY>
<H1>
Welcome to Anywhere Surgery
</H1>
Anywhere Surgery in Mytown is a practice of four doctors. We are committed to providing high quality care for all our patients.
<P>
Here is a list of the doctors who work at the surgery:
</BODY>
</HTML>
An "unordered list" is defined by the <UL></UL> pair of tags, and each list element has an (unpaired) <LI> tag. The browser draws in the bullet for you: <HTML>
<HEAD>
<TITLE>
Anywhere Surgery homepage
</TITLE>
</HEAD>
<BODY>
<H1>
Welcome to Anywhere Surgery
</H1>
Anywhere Surgery in Mytown is a practice of four doctors. We are committed to providing high quality care for all our patients.
<P>
Here is a list of the doctors who work at the surgery:
<UL>
<LI>Dr V Cleverly MD FRCP FRCGP DRCOG DCH
<LI>Dr A Risky LMCC DA DRCOG FP Cert
<LI>Dr M Doddery MRCP FRCGP Dip Rheum
<LI>Dr J Nobility OBE MD FRCGP
</UL>
</BODY>
</HTML>

...and so on. Click here to see what the page which we have built looks like.

Click on the Hints button to continue...