| More List Styles |
|
1-8 Explanation 1: The styles of the unordered list: disc, circle and square In an unordered list, the list-style-type property specifies the way items are marked: <ul style="list-style-type:value;" ></ul>.The property can be set to these values:
If this style is not set, like in the first example, then the value of the ordered list-style-type will default to disc. |
|
1-8 A 1
Create an HTML file that shows this content:
|
|
1-8 A 2
Create an HTML file that shows this content:
|
|
1-8 Explanation 2: The styles of the ordered list: decimal, upper-alpha, lower-alpha, upper-roman and lower-roman In an ordered list the list-style-type property specifies the way items are marked: <ol style="list-style-type:value;" ></ol>.The property can be set to these values:
If this style is not set, like in the first example, then the value of the ordered list-style-type will default to decimal. |
|
1-8 A 3
Create an HTML file that shows this content:
|
|
1-8 A 4
Create an HTML file that shows this content:
|
|
1-8 A 5
What is the difference between an ordered and an unordered list? |
|
1-8 Orientation 2: Copies of previous files In the Exercises01 folder, create a copy of the corresponding HTML file from the previous exercise for each of the following three exercises. Rename each copied HTML file using the exercise number. In your code, include comments that describe the lists you add. |
|
1-8 B 1 Cats Add texts for lists to include a disc list and a decimal list to the cats file you have created for an exercise on page 6. |
|
1-8 Explanation 3: Number of items in a list Logically, a list with a single item is still a list. But you should only create a list when you include more than one item. A single item can simply be stated in a sentence. |
|
1-8 B 2 Dogs Add texts for lists to include a circle list and an upper-alpha and an upper-roman list to the dogs file you have created for an exercise on page 6. |
|
1-8 B 3 Birds Add texts for lists to include a square list and a lower-alpha and a lower-roman list to the birds file you have created for an exercise on page 6. |
|
1-8 A 6 Rereading the yellow sections
Now that you have gone through the exercises on this page, reread the yellow sections. |
1-8 A 7
StarfruitJuice07.html
At this point you have 2 identical files, named StarfruitJuice06.html and StarfruitJuice07.html.
|
|
This page was created by Hanspeter Amend
|
|
|
Solution proposals 1-8 A 1
<ul style="list-style-type:square;"> </body> 1-8 A 2 <html> <ul style="list-style-type:circle;"> </body> 1-8 A 3 <html> <ol style="list-style-type:upper-alpha;"> </body> 1-8 A 4 <html> <body> <ol style="list-style-type:decimal;"> </body> 1-8 A 5 Ordered lists number the list items with numbers or letters. Unordered lists simply place a bullet or similar character in front of the list item. 1-8 A 7 <html> <!- - Title: Set style attribute for text style. - -> <!- - Line break - -> <!- - Paragraph - -> <!- - Set heading - -> <!- - Set style attribute for font styles. - -> <!- - Set style attribute for list style and font styles. - -> </html> |
|