[ Team LiB ] Previous Section Next Section

A Quick Introduction to HTML

Web pages are written in a text markup language called HTML (HyperText Markup Language). The idea of HTML is that you annotate, or mark up, regular text with special tags that indicate structure and formatting. For example, the title of a Web page is defined like this:

<TITLE>My Home Page</TITLE>

The tags provide general formatting guidelines, but the browsers that display HTML pages have freedom in how they display things. This keeps the markup simple. The general syntax for HTML tags is:

<tag parameters>normal text</tag>

As shown here, the tags usually come in pairs. The open tag may have some parameters, and the close tag name begins with a slash. The case of a tag is not considered, so <title>, <Title>, and <TITLE> are all valid and mean the same thing. The corresponding close tag could be </title>, </Title>, </TITLE>, or even </TiTlE>.

The <A> tag defines hypertext links that reference other pages on the Web. The hypertext links connect pages into a Web so that you can move from page to page to page and find related information. It is the flexibility of the links that makes the Web so interesting. The <A> tag takes an HREF parameter that defines the destination of the link. If you wanted to link to my home page, you would put this in your page:

<A HREF="http://www.beedub.com/">Brent Welch</A>

When this construct appears in a Web page, your browser typically displays "Brent Welch" in blue underlined text. When you click on that text, your browser switches to the page at the address "http://www.beedub.com/". There is a lot more to HTML, of course, but this should give you a basic idea of what is going on in the examples. Table 3-1 summarizes the HTML tags that will be used in the examples:

Table 3-1. HTML tags used in the examples

HTML

Main tag that surrounds the whole document.

HEAD

Delimits head section of the HTML document.

TITLE

Defines the title of the page.

BODY

Delimits the body section. Lets you specify page colors.

H1 - H6

HTML defines 6 heading levels: H1, H2, H3, H4, H5, H6.

P

Start a new paragraph.

BR

One blank line.

B

Bold text.

I

Italic text.

A

Used for hypertext links.

IMG

Specify an image.

DL

Definition list.

DT

Term clause in a definition list.

DD

Definition clause in a definition list.

UL

An unordered list.

LI

A bulleted item within a list.

TABLE

Create a table.

TR

A table row.

TD

A cell within a table row.

FORM

Defines a data entry form.

INPUT

A one-line entry field, checkbox, radio button, or submit button.

TEXTAREA

A multiline text field.

    [ Team LiB ] Previous Section Next Section