Intro to HTML

An HTML document has two elements: document content and tages.  Document content are those parts of the document that you want the user to see, such as text and graphics Tags are the HTML codes that indicate the document content.  You apply a tag to document content using the syntax:

   <Tag Name Properties>  Document Content  </Tag Name>

You can always identify a tag by the brackets(<>) that enclose the tag name.  Some tags can include properties, or additional information placed within the brackets that defines the tag's appearance.  Tags usually come in pairs: the opening tag is the first tag, which tells the browser to turn on the feature and apply it to the document content that follows.  The browser applies the feature until it encounters the closing tag, which turns off the feature. Note that closing tags are identified by the slash (/) that precedes the tage name. Not every tag has an opening and closing tag. Some  tags are known as one-sided tags because they require only the opening tag. Two sided tags require both opening and closing tags.

Example:

  <H1 ALIGN=CENTER> Text Content</H1>

Would appear like this:
 

Text Content

Here the <H1 ALIGN=CENTER> opening tag tells the browser that the text  that follows it, should appear as a heading 1. This tag also includes a property, the alignment property (ALIGN), which tells the browser how to align the text: in this case, centered. After the opening tag comes the content. The </H1>  tag signals the broswer to turn off the H1 heading. Remember that each broswer determines the exact look of H1 heading. One broswer might  apply a 14-point Times Roman bold font, whereas another broswer might use 18-point italic Arial.

Tags are not case sensitive. That means typing "<H1>" has the same effect as typing "<h1>". Many Web authors like to use only uppercase for tags to distinguish tags from document content.


back to main help page next page