|
creating ordered lists Ordered or numbered lists start with the <ol> tag and end with the </ol> tag. The <li> tag must precede each piece of data on the list but no end tag is necessary. To put a title on your list simply use the <lh> tag. No end tag is necessary but I recommend that you add a <br> tag afterwards otherwise older versions of Internet Explorer will have the first list item on the same line as the heading. This is all you need to know to begin. |
|
That is the most basic example of a list and it is displayed in Internet Explorer 4 as: Explorer View 6.1 - click on the
image to see a bigger and clearer version "type=?" You can customise your ordered lists by using the type attribute of the <ol> tag. There are five options for this attribute. They are Type=1 Result=1, 2, 3, 4, 5 (this is the default) Type=i Result=i, ii, iii, iv, v Type=I Result=I, II, III, IV, V Type=a Result=a, b, c, d, e Type=A Result=A, B, C, D, E the start attribute It is possible to interrupt your list with text and return to it later by using the start tag. To use it, simply set its value to the value you want the list to start at. If you are not using the default type setting then you must specify the type in the <ol> tag too. The following Notepad viewer and resulting Explorer view will hopefully help those who are still kind of confused about the type and start attributes.
|
|
Explorer View 6.2 - click on the
image to see a bigger and clearer version creating unordered Lists Unordered lists or bulleted lists are started with the <ul> tag and ended using the </ul> tag. Once again the <lh> and <li> tags are used to enter data. Type is the only attribute of the <ul> tag and there are three options for this. They are square, circle and disc. The following Notepad Viewer and corresponding Explorer View show you how to use the <ul> tag and display all the types of bullets.
|
|
Obviously there is no need for a "start=" attribute of the <ul> tag because each of the bullets is the same regardless its order, hence unordered list. The default type on Internet Explorer 4 is disc. I am not certain about other browsers. As far as I can remember the default on Internet Explorer 3 is square, but I would not swear on it. If it is important to you that your list appears a certain way then make sure to define it. Explorer View 6.3 - click on the image to see a
bigger and clearer version creating menus Menus are enclosed within the <menu> and </menu> tags and use the <lh> and <li> tags for data input. Menus are identical to unordered lists except that there is only one type and that is disc. |
|
creating directory lists Directory lists are enclosed within the <dir> and </dir> tags and use the <lh> and <li> tags for data. Directory lists are exactly identical to menu lists. Browsers do not yet interpret a difference between them and unordered lists but their intended purpose is to provide a list that looks like a DOS list with the /w parameter. creating definition lists Definition lists or glossary lists are enclosed within the <dl> and </dl> tags. They are different from the other list types in that each entry has two parts. They are <dt> and <dd>. I am not certain but I think these terms mean definition term and definition description or data. The description appears indented from the term, kind of like a dictionary or thesaurus. The only attribute of the <dl> tag is "compact" this supposedly presents the list in a smaller font or something else but it does not seem to make any difference on Internet Explorer 4. |
|
The above HTML listing is presented in Internet Explorer 4 like this: Explorer View 6.4 - click on the image for a bigger and clearer version
|
|
|
text formatting within a list As you probably noticed in the listings so far I have been using the <i> and </i> tags to format some of the text. I would like you to know that all of the other types of text formatting such as bold or strikethrough can also be used. Although headings seem to present well on Internet Explorer 4 but I am informed that they can mess up the presentation on earlier versions. Therefore I would advise to using headings i.e.<h1>heading size 1</h1> only for the list heading and not in list items. compact This attribute can be used for <ol>s <ul>s and <menu>s but it does not make a visual difference in Explorer 4 although in theory it should make it smaller. combining list types It is possible to add lists within lists whether they are the same type or not. All you have to do is enclose the list start and end tags within the start and end tags of the list within which you want it to be enclosed. Sound complicated? It really isnt. It might be easier to understand if I show you. Just pay attention to Notepad viewer 6.5 and observe its result in Explorer View 6.5. |
|
As you can see, I started off with an ordered list that contained 2 items. Each of these items then had an unordered list containing 2 items. One of these items then had a definition list. On the next page you will see how these lists are presented in Internet Explorer 4. |
|
Explorer View 6.5 - click on the image for a bigger and clearer version Notice that I also used some of the physical formatting tags that you learned about earlier on. personalising your lists When using unordered lists you can choose an image to use as your bullet simply by removing the <li> tag and replacing it with: <img src= "image.gif"> Make sure that the image is not too big or it might take time to download. Remember too that you now must include the <br> tag at the end of each item. In fact all you are doing is using the <ul> tag to indent the list. It serves no other purpose. The list would look exactly the same if you didn't use it except that it wouldn't be indented. |
![]() ![]() ![]() |
Explorer View 6.6 - click on the image for a bigger and clearer version indenting To indent your list more simply include more than one start tag, but remember to have the same amount of end tags. <ul><ul> ~~~~~~~~~~~~~~ </ul></ul> conclusion I am confident now that you will be able to create attractive easy to read lists on your web page. Dont forget that when you learn how to insert hyperlinks into your documents, your lists will function excellently as menus so as viewers can navigate around your site with greater ease. next lesson  home  comment  more downloads  download this |
![]() ![]() ![]() |
Notepad Viewer- HTML Builder 4
next lesson  home  comment  more downloads  download this |
This document was last modified
by the author (above) on 5/12/1998
© copyright 1998