To create a Horizontal Rule, put <HR> where you wish the line to be in your document.
To create an unordered list, start it with <UL> and put </UL> at the end of where you want the list to be. This marks the area included in the list. Now, each region between these two tags and preceded by a <LI> is a new List Item and would be marked somehow, usually being preceded by a bullet or asterisk.
For example, a list of the days of the week would look like:
<UL>
<LI>Monday
<LI>Tuesday
<LI>Wednesday
<LI>Thursday
<LI>Friday
<LI>Saturday
<LI>Sunday
</UL>
And would be shown by your browser as:
Within each list entry, you can use other HTML elements, such as bold, italics, and line break, to create better looking lists. You can even nest new lists within the current list, but if you choose to do this, be very careful to check the placement of the opening and closing elements of all the lists.
For example, an ordered list of the months of the year would look like:
<OL>
And would be shown by your browser as:
For example, a well known song from The Sound of Music might be
represented as:
<DL>
And would be shown by your browser as:
One thing to keep in mind when including images is how long they
will take to load. Many people access the Web through a 14.4k modem,
or even slower. Even with a direct internet connection, very large
images can take quite a while to be transfered in full. A good
guideline for your images is to keep icons under 2k, and keep other
images under 25k whenever possible.
For example, if you wished to include a picture of a balloon that you
have called balloon.gif, with the alternate text "This is a Balloon",
you would do:
<IMG SRC="balloon.gif" ALT="This is a Balloon">
If you did not want any alternate text, you would:
<IMG SRC="balloon.gif" ALT="">
And, if you did not care about the alternate text, you could simply:
<IMG SRC="balloon.gif">
The Ordered List
The Ordered list is very similar to the unordered list, but instead
of a bullet or asterisk preceding each item, the items in an ordered
list have a definite order and are preceded by numbers or letters to
show that order. The structure of the ordered list is exactly the
same as the unordered list, except that you use <OL> to mark the
beginning and </OL> to mark the end of the list.
<LI>January
<LI>February
<LI>March
<LI>April
<LI>May
<LI>June
<LI>July
<LI>August
<LI>September
<LI>October
<LI>November
<LI>December
</OL>
The Dictionary List
The Dictionary list is the third and most complicated of the list
types. As the name suggests, the dictionary list was created to be
used in applications where there would be a series of items, each with
further information. A dictionary list is started with <DL> and
ended with </DL>. Each entry is made up of up to two tags. The
primary one is the Dictionary Term tag <DT>. The secondary part
of the entry is the Dictionary Description tag <DD>. The
Description sections are usually represented as indented from the Term
Sections.
<DT>Do
<DD>A deer, a female deer
<DT>Re
<DD>A drop of golden sun
<DT>Mi
<DD>A name, I call myself
<DT>Fa
<DD>A long, long way to run
<DT>So
<DD>A needle pulling thread
<DT>La
<DD>A note to follow so
<DT>Ti
<DD>I drink with jam and bread
</DL>
Inline Images
The ability to include images in HTML pages gives the Web much of the
impact that it has. The format for including an image is <IMG
SRC="imagepath" ALT="alttext">, where imagepath is replaced with
the name or URL of the image, and alttext is the text to be displayed
on browsers that are not capable of displaying images. If you wish,
alttext can be empty, but that often looks much better than the
default method of denoting images some text browsers use.
Up to the Primer Lesson List.
Back to the previous lesson.
Return
to the Pegasus home page.