Computer Science, asked by distroyer4207, 7 months ago

which two types of list can be used in creation of a nested list?

Answers

Answered by akanksha2614
4

Answer:

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…)

As with unordered lists, you can use CSS to change the style of your ordered lists. See Styling lists and links for more information.

Ordered list markup

Ordered lists use one set of <ol></ol> tags wrapped around one or more sets of <li></li> tags:

<ol>

<li>Gather ingredients</li>

<li>Mix ingredients together</li>

<li>Place ingredients in a baking dish</li>

<li>Bake in oven for an hour</li>

<li>Remove from oven</li>

<li>Allow to stand for ten minutes</li>

<li>Serve</li>

</ol>

Beginning ordered lists with numbers other than 1

A common requirement in ordered list usage is to get them to start with a number other than 1 (or i, or I, etc.). This is done using the start attribute, which takes a numeric value (even if you’re using CSS to change the list counters to be alphabetic or Roman). This is useful if you have a single list of items, but need to break up the list with a note or other related information. For example, we could do this with the previous example:

<ol>

<li>Gather ingredients</li>

<li>Mix ingredients together</li>

<li>Place ingredients in a baking dish</li>

</ol>

<p>Before you place the ingredients in the baking dish, preheat the oven to

180 degrees centigrade/350 degrees fahrenheit in readiness for the next step.</p>

<ol start="4">

<li>Bake in oven for an hour</li>

<li>Remove from oven</li>

<li>Allow to stand for ten minutes</li>

<li>Serve</li>

</ol>

This gives the following result:

Gather ingredients

Mix ingredients together

Place ingredients in a baking dish

Before you place the ingredients in the baking dish, preheat the oven to 180 degrees centigrade/350 degrees fahrenheit in readiness for the next step.

Bake in oven for an hour

Remove from oven

Allow to stand for ten minutes

Serve

Note that this attribute was deprecated in HTML 4, so it will prevent your page from validating if you are using an HTML4 strict doctype. If you want to make use of such functionality in an HTML4 strict page, and it absolutely has to validate, you can do it using CSS Counters instead. Fortunately, however, the start attribute has been reinstated in HTML..

Answered by niki6621
0

Answer:

unordered List

ordered list

description list

Similar questions