1.0 HTML (Hyper Text Markup Language)

Web pages, including the one you are reading right now, are built using a software programming language called HTML, which stands for Hyper Text Markup Langauge. This is a relatively simple text-based language that can be written offline using a very basic text editor, such as Microsoft Notepad. Constantly being improved and updated to meet the demands of website developers and an ever-changing Internet, this tutorial will focus on XHTML (Extensible Hyper Text Markup Language). This is a stricter, cleaner version of HTML, and XHTML 1.0 became a W3C recommendation on 26 January 2000. XHTML is case-sensitive and is written in lower case, unlike HTML, which is not case-sensitive but is generally written in lower case also.

HTML Parsing

Internet browsers, such as Internet Explorer, Mozilla Firefox, Apple Safari and Opera for example all read (or parse) (X)HTML in the same fashion that we read the pages of a book - from top to bottom and from left to right. This is the order in which the code is read. And from here on in, we will refer to XHTML as HTML for simplicity.

Introducing Elements and Tags

HTML language is composed mostly of elements. An element is simply a line of code consisting of an opening tag, some content, and a closing tag. Learning HTML then is essentially all about learning how to use the many different tags, which from here on in will be displayed in blue for ease of recognition.

For a browser to recognise a tag, they are encased by the symbols < > (less than and greater than, with the tag placed between). A closing tag is identified using a forward slash before the tag </tag>. For example:

<p>Hello, stick with it!</p>

The above element uses the paragraph tag <p> to display a line of text in a browser. The opening tag was <p>, the content was "Hello, stick with it", and the closing tag was </p>. This would look like this in a browser:

Hello, stick with it!

This is the basic structure of almost every element in HTML, although some elements are opened and closed within the same tag (for example <br />, which forces a horizontal line break).