Introduction to HTML

HTML or HyperText Markup Language, is the language in which World Wide Web pages are written. HTML documents are basically text documents which contain special codes along with the text to be displayed. They can be written with any word processor that can save the file as plain (ASCII) text, or using a special HTML editor such as FrontPage or HotDog.

The codes, or, as they are called, "markup tags", that are inserted in the text, tell a browser how to display the document on the screen, and how to display images and other multimedia files in the document. They also activate the links between different documents.

 Here is a basic example of HTML:


<HTML>
<HEAD>

<TITLE>My Home Page</TITLE>

<center><H2>An Example of a Web Page</H2></center>

</HEAD>

<BODY>

Welcome to my home page!

<P>This is plain text, where I'll be telling you about all the wonderful things I plan to put on this site.</P>  

<P>Meanwhile, you can look at <A HREF="http://israweb.co.il/judyk/">my teaching site</A>, or go directly to our course list of <A HREF="html-res.html">HTML guides and tutorials</A> (adapted from a much <a href="http://www.israweb.co.il/judyk/html.htm"> longer list on my teaching site).
</P>
</body>
</html>


When a Web browser displays this according to the instructions in the tags, it looks like this:

An Example of a Web Page

Welcome to my home page!

This is plain text, where I'll be telling you about all the wonderful things I plan to put on this site.

Meanwhile, you can look at my teaching site, or go directly to our course list of HTML guides and tutorials (adapted from a much longer list on my teaching site).


The words in angle brackets (< and >) in the above example are the tags.  

 


The Basic Layout of a Web Page

So the basic layout of an HTML document is:
 

<HTML>

   <HEAD>

      <TITLE>My Home Page</TITLE>

   </HEAD>

   <BODY>

    (Everything in the page comes here)

   </BODY>

</HTML>

I've set out the code with different indents so that it's easy to see that you have an ending tag for each opening tag. This isn't strictly necessary for the basic page skeleton we've learnt now, but it's useful for some other tags used in the middle of the page, so it's a good idea to get into the habit of it. It makes trouble-shooting much easier!

Some browsers will interpret a page correctly even if you don't use <HTML>, <HEAD>, and <BODY> tags, and you'll see pages on the Web that don't include them. However, this is incorrect HTML, and some browsers will have trouble with it. Also, as soon as you write non-standard HTML which does not conform to the protocol, you have no guarantee that the next version even of a browser that currently understands what you have written, will continue to do so.

 

Back to course entry page


Written by J. Koren for Unesco
©1998