LISTS
LISTS
1. Locate the part of your HTML document where you want to insert a list.
Begin the unordered list by typing <UL>.
2. Create a heading for your list. This is an optional brief description of what
your list contains.
3. To create a list header, type <LH>, followed by a brief summary of the list
contents. Then type </LH> to close the list heading tag.
For example, to create a list heading for a subject list, you would type:
<UL>
<LH>My Subjects List</LH>
H O W T O C R E AT E A N U N O R D E R E D L I S T ?
4. To create the first item in your list, type <LI> then type the text of the item itself.
<UL>
<LH> My Subjects List </LH>
<LI> Algebra
<LI> Web Programming
<LI> Data Structure
5. Continue typing <LI> followed by text for each item in your list. Press <ENTER> after each
item.
6. Finish the unordered list by typing </UL>.
<UL>
<LH> My Subjects List </LH>
<LI> Algebra
<LI> Web Programming
<LI> Data Structure
</UL>
UNORDERED LISTS
• There are browsers that allows you to explicitly choose which type of bullet to
use for any level by using the TYPE attribute.
• You have the choice of three bullet types: Disc
• (default), Circle, Square, like:
<UL TYPE="disc">,
<UL TYPE="circle">, or
<UL TYPE="square"> instead of <UL>.
Example
<UL TYPE=“square”>
<LH>My Subjects List</LH>
<LI>Algebra
<LI>Web Programming
<LI TYPE=“disc”>Data Structure
</UL>
ORDERED LISTS
Example
1. Locate the place in your document where you'd like to begin the list and type
<OL>.
2. For an optional heading of an ordered list, type <LH> followed by the
heading and then close the heading tag by typing </LH>.
For example, to create a list heading for a subjects list, you would type:
<OL>
<LH> My Subjects List </LH>
H O W T O C R E AT E A N O R D E R E D L I S T ?
3. To create the first item in your list, type <LI> then type the text of the item
itself.
<OL>
<LH> My Subjects List </LH>
<LI> Algebra
<LI> Web Programming
<LI> Data Structure
4. Continue typing <LI> followed by text for each item in your list.
5. Finish the ordered list by typing </OL>.
<OL>
<LH> My Subjects List </LH>
<LI> Algebra
<LI> Web Programming
<LI> Data Structure
</OL>
ORDERED LISTS
START Attribute
This attribute uses the <OL> tag to let you change a beginning value.
<OL start=5>
<LI> This is item number 5.
<LI> This is number six!
<LI> And so forth... </OL>
ORDERED LISTS
The TYPE attribute can also be used with the <OL> tag to change the numbering
style itself.
<DL>
<DT> HTML </DT>
<DD> Hyper Text Markup Language </DD>
<DT> Cat </DT>
<DD> A dog's best friend! </DD>
</DL>
H O W T O C R E AT E A D E F I N I T I O N L I S T ?
1. Type <DL> at the point where you'd like the list to begin.
2. For a definition term, type <DT> followed by text describing the element being defined.
<DL>
<DT> Internet
3. For the definition, type <DD>, followed by the text of the definition.
<DL>
<DT>Internet
<DD>It is a worldwide collection of interconnected computers whose users can
communicate with each other and share information.
Internet
It is a worldwide collection of interconnected computers whose
users can communicate with each other and
share information.
H O W T O C R E AT E A D E F I N I T I O N L I S T ?
4. Create a new definition term, if necessary. As with ordered and unordered lists,
there are no closing tags for list items.
5. Type </DL> to close your definition list.
<UL TYPE="SQUARE">
<LI> List item... </LI>
<LI> List item... </LI>
<OL TYPE="i" START="3">
<LI> List item 1... </LI>
<LI> List item 2... </LI>
</OL>
</LI>
<LI> List item... </LI>
</UL>
W E B PA G E I M A G E F O R M AT S
• Inline images appear on a Web page along with text and links, and are
automatically loaded when the page itself is retrieved.
• External images are stored separate from the Web page and are loaded only on
demand, for example, as the result of a link.
• GIF uses a maximum of 256 colors, and uses combinations of these to create
colors beyond that number.
• Encoding is cross platform
• Uses special compression technology
• GIF images come in two different versions and have some extra functionality
that JPEGs do not.
• GIF images in GIF 87 or GIF 89a format.
• GIF 89a is newer and has the following features that GIF 87 and JPEG
files do not.
• Interlacing: an interlaced GIF will allow the browser to display the image as it loads,
getting gradually crisper and clearer until it is finished.
• Interlaced GIFs have slightly larger file sizes than non-interlaced GIFs.
G R A P H I C S I N T E R C H A N G E F O R M AT
• Transparency: with GIF 89a format images, it allows the background color or
image to show through it by setting one color to be transparent.
• Transparency is most commonly used to make the rectangular background
canvas of an image invisible.
• Animated GIFs: GIF 89a images can also be animated using special software.
• Animated GIF images are simply a number of GIF images saved into a single
file and looped.
• The .gif extension is used for GIF files.
• GIF-encoded image is not always appropriate, particularly for photorealistic
pictures since it supports only limited number of colors.
JOINT PHOTOGRAPHIC
E X P E RT S G R O U P F O R M AT
• JPEG is a standards body that developed what is now known as the JPEG image-
encoding format.
• Like GIFs, JPEG images are platform independent and specially compressed for
high-speed transfer via digital communication technologies.
• JPEG is a good format for photographs because JPEG files can contain millions
of colors.
• JPEG images does not support transparency or interlacing images, but it allows
you to specify the degree of file compression to create a balance between image
quality and file size.
LIMITED SUPPORT OR
N O N - S U P P O RT E D I M A G E F O R M AT S
• PNG: Portable Network Graphics, is good for combinations of text and graphics
within one image.
• PNG permits true color images, variable transparency, platform-independent
display, and a fast 2D interlacing scheme.
• Currently only supported by Internet Explorer.
Example:
• For a GIF file named image.gif in the same directory as this file, use
<IMG SRC="image.gif">
• For an image file one directory up from the current directory, use
<IMG SRC="../image.gif">
< I M G > AT T R I B U T E S
• Alternate Text (ALT): a text field that describes an image or acts as a label.
• It is displayed when people turn the graphics off in their browsers, or when they position the
cursor over a graphic image.
Example:
<IMG SRC="myimage.gif" ALT="[a picture of a cat]">
2. Now you need to specify the URL of the image to load by placing the SRC
(source) attribute within the <IMG> tag.
3. To link to images that are not in the same directory as the HTML document, use
relative URLs to locate them.
4. To specify the alternate text, type ALT=, followed by the text in quotes.
Example:
<IMG src=“images/logo.gif”alt=“Company logo here!”>
EXERCISE