Structure of an HTML Document
An HTML document has two main parts: the head and the body. But firstly every HTML document should start by declaring that it is an HTML document.
These tags are of the form:
- Should appear at the beginning of your document.
- Should appear at the end of your document.
This leads us nicely on to say more about [X]HTML tags. All formatting tags (or elements) are of the general form:
- Switches the tag sequence on. For example, to bold some text add a <strong> at the beginning of the text.
- Switches the tag sequence off. The tag_on and tag_off tags are the same except the off tag has an / character in front of it. For example, to switch off the bolding add a </strong> character sequence at the end of the text that is to be given the attribute of bolding.
Note: HTML is a case insensitive mark-up language, i.e. as far as all browsers are concerned the tags <HTML> and <html> are indistinguishable. However XHTML uses only lowercase tags which will be used throughout this course.