Name the list in which one list is placed inside the other list. (html)
Answers
Answer:
Nesting lists
Explaination:
An individual list item can contain another entire list, called a nested list. It is useful for things like tables of contents that contain sub-sections:
1. Chapter One
a. Section One
b. Section Two
c. Section Three
2. Chapter Two
3. Chapter Three
To reflect that in the code, the entire nested list is contained inside the first list item. The code looks like this:
<ol>
<li>Chapter One
<ol style="list-style-type: lower-alpha;">
<li>Section One</li>
<li>Section Two </li>
<li>Section Three </li>
</ol>
</li>
<li>Chapter Two</li>
<li>Chapter Three </li>
</ol>
Note that we have used the list-style-type: lower-alpha CSS property to sequence the nested list with lower-case letters instead of decimal numbers.
Nested lists are quite useful, and often form the basis for navigation menus, as they are a good way to define the hierarchical structure of the web site. They are also very flexible, as either ordered or unordered lists can be nested inside either ordered or unordered list items. For an example of nesting unordered lists within an ordered list, see “Choosing among list types” above.
Theoretically you can nest lists to any level you like, although in practice it can become confusing to nest lists too deeply. For very large lists, you may be better off splitting the content up into several lists with headings instead, or even splitting it up into separate pages. A good rule of thumb is, don’t nest lists deeper than three levels.
Explanation:
Lists are used to group together related pieces of information so they are clearly associated with each other and easy to read. In modern web development, lists are workhorse elements, frequently used for navigation as well as general content.
Lists are good from a structural point of view as they help create a well-structured, more accessible, easy-to-maintain document. They are also useful because they provide specialized elements to which you can attach CSS styles. Finally, semantically correct lists help visitors read your web site, and they simplify maintenance when your pages need to be updated.
The three list types
There are three list types in HTML:
unordered list — used to group a set of related items in no particular order
ordered list — used to group a set of related items in a specific order
description list — used to display name/value pairs such as terms and definitions
Each list type has a specific purpose and meaning in a web page.
Unordered lists
Unordered (bulleted) lists are used when a set of items can be placed in any order. An example is a shopping list:
milk
bread
butter
coffee beans
Although the items are all part of one list, you could put the items in any order and the list would still make sense:
bread
coffee beans
milk
butter
You can use CSS to change the bullet to one of several default styles, use your own image, or even display the list without bullets — we’ll look at how to do that in the Styling lists and links article.
Unordered list markup
Unordered lists use one set of <ul></ul> tags wrapped around one or more sets of <li></li> tags:
<ul>
<li>bread</li>
<li>coffee beans</li>
<li>milk</li>
<li>butter</li>
</ul>
Ordered lists
Ordered (numbered) lists are used to display a list of items that should be in a specific order. An example would be cooking instructions:
Gather ingredients
Mix ingredients together
Place ingredients in a baking dish
Bake in oven for an hour
Remove from oven
Allow to stand for ten minutes
Serve
If the list items were moved around into a different order, the information would no longer make sense:
Gather ingredients
Bake in oven for an hour
Serve
Remove from oven
Place ingredients in a baking dish
Allow to stand for ten minutes
Mix ingredients together
Ordered lists can be displayed with several sequencing options. The default in most browsers is decimal numbers, but there are others available:
Letters
Lowercase ascii letters (a, b, c…)
Uppercase ascii letters (A, B, C…).
Lowercase classical Greek: (έ, ή, ί…)
Numbers
Decimal numbers (1, 2, 3…)
Decimal numbers with leading zeros (01, 02, 03…)
Lowercase Roman numerals (i, ii, iii…)
Uppercase Roman numerals (I, II, III…)
Traditional Georgian numbering (an, ban, gan…)
Traditional Armenian numbering (mek, yerku, yerek…)