Alexander Spiteri's Home Page

HTML
For Beginners
 
The HTML Standard
 
The Hypertext Markup Language (HTML) is a very simple markup language used to create platform independent hypertext documents.

HTML has been in use by the World Wide Web information initiative since 1990. Presently, it has become the standard language for creating Web documents.
From a quite simple and rudimental language, it has evolved, due to the huge expansion of the World Wide Web, to become a very complete markup language, ideal to create Web documents.

Its development is one of the responsibilities of the W3C, which as recently developed the new HTML 3.2 specification. This new specification adds to the HTML 2.0 standard some widely deployed features, such as: tables and applets.

 
Basics
 
An HTML document is a text file that consists of text and tags that mark the structure of the Web document. After receiving an HTML file, the browser will use these tags (also known as elements) to display text, multimedia objects, and hyperlinks.

An element is the most basic part of HTML. It consists of a start-tag, an end-tag, and the data characters enclosed by the two tags.

  • A tag starts with a less-than (<) sign and ends with a greater-than (>) sign.
  • An end-tag consists of the tag name immediately preceded by a slash (/).
  • Some tags require that you always provide the matching end-tag.
  • Others allow you to omit the end-tag if the result is clear and unambiguous.

Consider the following example of an HTML element:

<B>This sentence will be displayed in Bold</B>

As you should already know, <B> is the start-tag and </B> the end-tag.

It's also possible to have nested elements, by placing an entire element inside another, as in this example:

<B>This sentence <I>will</I> be displayed in Bold</B>

Additionally, some elements have attributes, which are qualifications of the element's meaning or optional parameters for that element:

<P ALIGN="CENTER">This is a centered paragraph.</P>

 
Structure of HTML Documents
 
Here's the simplest form of an HTML document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN>
<HTML>
<HEAD>
<TITLE>Simple HTML</TITLE>
</HEAD>
<BODY>
<P>A very simple HTML document</P>
</BODY>
</HTML>

Notes:

  • Every HTML document begins with the !DOCTYPE element. !DOCTYPE specifies to the browser which version of HTML is being used.
  • The next element in this basic document is HTML, which informs the browser that the content of the file is written in HTML.
  • The HEAD tag marks the beginning of the document header.
  • The BODY element appears at the start of the main content of the document and encloses the body text, images, and multimedia objects.
  • The P element inserts a new paragraph with a carriage return and line feed.
 
Further study...
 
You are now in conditions to start creating your own HTML documents.
Off course you'll need to know a lot more. With this simple introduction to the basic concepts, we intended only to help you start learning HTML.
If you want to jump right into the HTML details, check this document: On the other hand, if you feel the need of more information tailored to HTML beginners, try these sites. You'll lots of information and links to other sites:
 
Back to Alexander Spiteri's Home