Basic HTML: Anatomy of an HTML Document

Anatomy of an HTML Document


An HTML document consists of a few simple "parts", similar to a letter.

<HTML>
<HEAD>
<TITLE>Your Document's Title</TITLE>
<META Name="Author" Contents="Your name">
<META Name="Description" Contents="Used for the search engine">
<SCRIPT>
</SCRIPT>
</HEAD>
<BODY>
<FORM>
</FORM>
</BODY>
</HTML>

What do these tags do?











Definitions:
[Go back]

<HTML></HTML> Indicates the beginning and ending of the HTML Document
<HEAD></HEAD> Provides information about the document for the server or browser..
<TITLE></TITLE> Supplies the text which will be displayed in the menu bar of the browser.
<META></META> Used with a set of key words to provide selected information to the server.
Examples: Author, Description
<SCRIPT></SCRIPT> Alerts the browser to the presence of JavaScript or similar scripting language which the browser will need to interpret
<BODY></BODY> Contains the information that will be displayed within the browser...
<FORM></FORM> Creates logical sections used to gather or simply display information in controls (i.e. radio buttons, checkboxes, text boxes, etc..)


























<BODY> Attributes --[Go back]

BACKGROUND Sets graphic as a background for the page
BGCOLOR Sets background color for the page
TEXT Sets default color for all text on the page
LINK Sets default link color
ALINK Sets default "active" link color
VLINK Sets default "visited" link color


Code:

<BODY BACKGROUND="images/ltgback.jpg" BGCOLOR="#FFFFFF" TEXT="navy" LINK="red" VLINK="maroon" ALINK="blue">

Notice:

  1. the address "images/ltgback.gif" is relative to the address where this page resides.
  2. "#FFFFFF" is an RGB triplet and describes a color in hexadecimal. In this case, white.
  3. "navy" and "maroon" also represent colors, but they are reserved words.