Page 46 - DCAP202_Fundamentals of Web Programming
P. 46
Unit 4: HTML List
4.1.2 UnorderedList and UnorderedListItem Notes
Use the UnorderedList and UnorderedListItem classes to create unordered lists in your HTML
pages.
Methods for UnorderedList include:
Get and set the type (or style) for the items
Methods for UnorderedListItem include:
Get and set the type (or style) for the item
Task Illustrate the methods for UnorderedList and UnorderedListItem with example.
Self Assessment
Fill in the blanks:
1. The ........................... classes allow you to easily create lists within your HTML pages.
2. The ........................... OrderedList and OrderedListItem are used to create ordered lists in
your HTML pages.
3. By using the methods in ..........................., you can override the numbering and type for a
specific item in the list.
4.2 HTML List Types
HTML provides three different types of lists to choose from when building a page, including
unordered, ordered, and definition lists. Unordered lists are for lists of items where order isn’t
of important. While ordered lists place strong importance on the order of items. In the case
where there is a list of terms and descriptions, perhaps for a glossary, definition lists are available.
4.2.1 Unordered List
Unordered lists are purely a list of related items, in which their order does not matter nor do
they have a numbered or alphabetical list element. Creating an unordered list in HTML is
accomplished using the unordered list, ul, block level element. Each list item within an unordered
list is individually marked up using the list item, li, block level element.
By default most browsers represent each list item with a solid dot.
!
Caution The solid dot is referred to as the list item element and can be changed using CSS.
Example:
<ul>
<li>Tamilnadu</li>
<li>Uttar Pradesh</li>
<li>West-Bengal</li>
</ul>
LOVELY PROFESSIONAL UNIVERSITY 39