home  egovision html tutorials  tutorials home

Lesson 2. Structuring your page.

Introduction to HTML Tags.

The HyperText Markup Language (HTML) consists of a series of commands called Tags which are implemented between chevron brackets < > in the following manner...

<TAG>

Tags can be split into two categories, Open tags and Closed tags. Most tags are Closed tags, that is to say that the command must be started (or Opened) with a tag and then Closed with another tag. This is presented in the following form...

<TAG>Something to which the tag applies</TAG>

Notice the use of the "slash"/ symbol to "Close" the command. Think of the tag as if it were quotation marks and everything within those quotes appears in a defined way. Closed tags, like quote marks, are paired.
This is the basis of nearly all HTML tags with a few exceptions, the Open tags. These describe specific events such as a line break (or carriage return) or rendering a horizontal line. These tags are few in number but often can be the most useful.

The <HTML> Tag.                                       <HTML>     </HTML>
The HTML tag is a Closed tag and should be Opened at the start of your document and Closed at the very end. In other words everything else should be "inside" the <HTML> tags. This tells the browser that you're starting some HTML code and ending some HTML code. There are other languages used in the construction of Webpages and it is important to specify which language each section is written in. Now we have to put something in the document.

The <HEAD> Tag.                                       <HEAD>     </HEAD>
The HEAD tag is another Closed tag. As it's name suggests, it defines the document header. This tag will become important later on in the tutorials, but for now it will just contain the TITLE tag.

The <TITLE> Tag.                                       <TITLE>     </TITLE>
The TITLE tag is also a Closed tag and it contains the title information for the document. This is easy so far isn't it? The title of the page appears in the title bar of the browser window and is also used as the title of the page when someone bookmarks your page on the Internet . On this page the title is egovision.org html tutorials and the tag for this page is......

<TITLE>egovision.org html tutorials</TITLE>

On the whole the information in these tags is not seen inside the browser window. It is instructional information.

The <BODY> Tag.                                       <BODY>     </BODY>
The final major tag in HTML. It defines, as its name suggests, the body of the document - its content and the way that the content is presented.

A Basic HTML Page.
Using the <HTML>, <HEAD>, <TITLE> and <BODY> tags we can now build a basic HTML using a text editor such as Notepad like so......

script1 notepad screenshot
Create a new directory on your hard drive e.g. C:\htmlfiles and save the file you have just created as script1.html.

Tip: When saving the file, ensure that your file type is set to All files, otherwise the file will save as a standard text file and not HTML.

Open your web browser to view the new page
From the File pull-down menu, select Open or Open Page

It should appear something like this:
script1 explorer screenshot

Now you have successfully created a basic, structured, HTML page and inserted some content.

downloadClick Here
to download the
example files
used in this lesson.


next lesson

egovision


Tutorial Site Map

HTML Resource Centre

Lesson 1
Getting Started
  • Tools you will need
Lesson 2
Structuring Your Page
  • Introduction to HTML
  • A Basic HTML Document
Lesson 3
Text on Your Page
  • Formatting Text
  • Text Hyperlinks
  • Horizontal Rule
  • Line Break & Paragraphs
Lesson 4
Images and Backgrounds
  • Page Backgrounds
  • Placing an Image
  • Image Hyperlinks
Lesson 5
Tables and Formatting
  • Creating a Table
  • Invisible tables as Layout
  • Table Backgrounds
  • Nested Tables