Tags

The Hypertext Markup Language (HTML) is used to define the layout of a web page. The file itself is simply a text file with special tags that designate the HTML code. Although there are a number of HTML editors available, any program that will save a file in text format, such as Windows Notepad, can be used to create web pages (NOTE: make sure you save your webpages with a .htm or .html file extension). A tag is a less than and greater than sign <...>, with the HTML code enclosed, (<HTML> for example). In most cases the tags are used in pairs. The opening tag <...> marks the start of the formatting, and the ending tag </...> marks the end. The HTML tags are not case sensitive so you can use upper or lowercase wording. I personally like to use uppercase, because it makes the tags easier to read when creating a web page.

HTML tags are interpreted by the browser being used to view the document. As the page is loaded, it "reads" the file and displays it according to the tags. One important fact is that not all browsers interpret the tags in the same manner, so when designing a web page it's advisable to preview it in as many different browsers as possible. Another point is that the HMTL specifications have changed over the last few years as new tags have been introduced, so only the newest browsers know all the HTML tags. Most browsers will ignore tags they don't know, so the web page you just spent days designing, that looks great in Netscape or Internet Explorer, may look terrible if someone views it using an older browser. Some tags are even browser specific.


Attributes

Most tags also contain attributes, or additional information on how to interpret the tag. The attributes are set to certain values depending on what they are, so the bgcolor (background color) would equal a color (bgcolor="#ffffff") but background (background image) would point to a file (background="cloud.gif"). In some cases the attributes are optional, such as the background in a <BODY> tag. An example of a required attribute is the src= in the <IMG> image tag. When the browser reaches an <IMG> tag it knows its supposed to place an image there, but it has to know what image file to use. Throughout this tutorial I will show you most of the tags in the latest HTML 3.2 specifications, as well as some browser specific tags. The optional attributes will be shown for each tag in italics.



BACK Table of Contents NEXT