HTML Elements
HTML tags are not sensitive to case and ignores spaces entered with Tab or Enter. When using these HTML tags, be aware that different browsers can display them differently.
The following are some of the elements that are commonly used to create a web page. Text in Italics can be replaced with your own.
Anchor Element : <A...>...</A>
An anchor is a hypertext link element that defines a marked text as a link or target destination.
- Hypertext Link To Another File or Resource
<A HREF="http://www.yahoo.com">Yahoo</A>
The above identifies the word "Yahoo" which when selected will link to the yahoo site.
- Define A Target Of A Link
<A NAME=Where>Somewhere</A>
The value in the NAME attribute identifies the location of a target. The example "Somewhere" can be reached by another anchor when referenced with "Where".
- Hypertext Link To A Location In The Same Document
<A HREF=#Where>Goto Somewhere</A>
When the "Goto Somewhere" is selected, the document transfers to a location referenced by "Where".
- Hypertext Link To A Location In Another Document
<A HREF="example.html#Where">Goto Somewhere</A>
When the "Goto Somewhere" is selected, the document transfers to another file at location referenced by "Where".
Level Headers Element : <H1>...</H1>
This defines the format for text enclosed by the pair of level headers, using the font and size defined by level 1 header which is usually the largest. The following represents the six levels of headings.
LEVEL 1 HEADER <H1>...</H1>
LEVEL 2 HEADER <H2>...</H2>
LEVEL 3 HEADER <H3>...</H3>
LEVEL 4 HEADER <H4>...</H4>
LEVEL 5 HEADER <H5>...</H5>
LEVEL 6 HEADER <H6>...</H6>
Text Formatting Elements
- Paragraph Element : <P>...</P>
This specifies the text enclosed by the pair of tags as a paragraph. Each paragraph is terminated by a line feed.
- Line Break : <BR>
Force a line break immediately retaining the formatting style.
- Hard Line Break : <HR>
Force a line break and produce a separation line on the page
- Text Centering : <CENTER>...</CENTER>
Centering Text on the page.
- Bold : <B>...</B>
Boldface text.
- Italics : <I>...</I>
Italics text.
- Underlined : <U>...</U>
Underlined Text.
- Blink : <BLINK>...</BLINK>
Ordered List Elements
The ordered list element present a sorted numbered list of items. The format is :
<OL>
<LI> First item in the list
<LI> Next item in the list
</OL>
Uordered List Elements
The unordered list element present a bullet list of items. The format is :
<UL>
<LI> First item in the list
<LI> Next item in the list
</UL>
In-line Images <IMG ...>
The Image element is used to incorporate graphics or pictures into the document. The image element has the following attributes.
SRC
This value specifies the URL of the image file to be embedded.
ALIGN
The ALIGN attribute has three arguments; TOP, MIDDLE or BOTTOM. This specifies the alignment of the graphics with the surrounding text.
ISMAP
The ISMAP attribute specifies the graphics image as a map with certain regions that have been assign with a URL address.
Example
<IMG SRC="picture.gif" ALIGN=TOP >
<A HREF="http://example.html"><IMG SRC="mymap.gif" ISMAP ></A>
Table Formatting Elements
The table elements defined the tags necessary to format a table structure. At present the following are the tags defined.
<TABLE>...</TABLE> - Table delimiter
<TR...>...</TR> - Row specifier
<TD...>...</TD> - Specifies table data cells
<TH>...</TH> - Table Header cell
<CAPTION>...</CAPTION> - Table Caption
Example
| CELL A | CELL B | CELL C |
| CELL D | CELL E | CELL F |
The above table is formatted using the following tags
<TABLE BORDER>
<TR>
<TD>CELL A</TD><TD>CELL B</TD><TD>CELL C</TD>
</TR>
<TR>
<TD>CELL D</TD><TD>CELL E</TD><TD>CELL F</TD>
</TR>
</TABLE>
Back to previous
Presented by Dr Hum Tee Yeow at Hong Kah Ease CC on 15th June 1996
Last update 14 June 1996
Dr Hum Tee Yeow
tyhum@pacific.net.sg
URL:http://home.pacific.net.sg/~tyhum