Answers Search Help
Boston University home page
HTML: Introduction
 
 
    Components
 
 
 
 
 
 
    Syntax
 
 
 
 
 
    Essential Tags
 
 
 
 
 
 
 
 
    HTML Headings
 
 
    Text
 
 
 
 
    Layout
 
 
 
 
 
 
 
    Links & Images
 
 
 
 
    Publishing
 
 
    Also See
 
 

Tag Format

You write HTML by using a variety of tags. A tag is typically an English word (or abbreviation) enclosed inside angle brackets. For instance, here is a paragraph tag:

<p>

Most HTML requires you to use both an opening and a closing tag. The opening and closing tags are identical, except the closing tag has a slash ( / ) after the first angle bracket and before the alphanumeric code. Here is the closing paragraph tag:

</p>

The code operates on the text between the opening and closing tags. For example:

<p>This is a paragraph.</p>

For some tags, a closing tag is either inappropriate (there is no text contained in the tag to operate on) or not used. In these cases, instead of writing:

<br></br>

You can instead write:

<br />

It is always a good idea to close all tags, even if the browser can guess and understand an unterminated tag, since this helps with cross-browser compatibility and is the rule (rather than the convention) in XHTML.

WebCentral Using Publishing Learning Training Consulting WebCentral
Answers Search Help
NIS  |  OIT  |  Boston University  |   January 9, 2007