0% found this document useful (0 votes)
60 views3 pages

Lists: There Are Three List Types

Lists are used to group related information together in an organized manner. There are three types of lists: unordered, ordered, and description lists. Unordered lists use bullets and have no particular order. Ordered lists use numbers and specify an order. Description lists display name-value pairs. CSS properties like list-style-type and the OL type attribute are used to style list markers. Common tags for lists are <ul>, <ol>, and <li>.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views3 pages

Lists: There Are Three List Types

Lists are used to group related information together in an organized manner. There are three types of lists: unordered, ordered, and description lists. Unordered lists use bullets and have no particular order. Ordered lists use numbers and specify an order. Description lists display name-value pairs. CSS properties like list-style-type and the OL type attribute are used to style list markers. Common tags for lists are <ul>, <ol>, and <li>.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

LISTS

Lists are used to group related pieces of information together, so they are clearly associated
with each other and easy to read.

There are three list types:


 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 their definitions, or times and
events.

Unordered lists

Unordered lists, or 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

Ordered lists

Ordered lists, or numbered lists, are used to display a list of items that need to be placed in a specific order.
An example would be cooking instructions :

1. Gather ingredients
2. Mix ingredients together
3. Place ingredients in a baking dish
4. Bake in oven for an hour
5. Remove from oven
6. Allow to stand for ten minutes
7. Serve

LISTS USING CSS:

The CSS list-style-type property is used to define the style of the list item marker:

a. Unordered list:

Value (Symbol) Description


 Disc Sets the list item marker to a bullet (default)
 Circle Sets the list item marker to a circle
 Square Sets the list item marker to a square
 None The list items will not be marked
Example:

<!DOCTYPE html>
<html>
<body>

<h2>Unordered List with Disc Bullets</h2>

<ul style="list-style-type:enter your value(symbol type)">


<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>

</body>
</html>

b. Ordered list:

The type attribute of the <ol> tag, defines the type of the list item marker:

Type Description
type="1" The list items will be numbered with numbers (default)
type="A" The list items will be numbered with uppercase letters
type="a" The list items will be numbered with lowercase letters
type="I" The list items will be numbered with uppercase roman numbers
type="i" The list items will be numbered with lowercase roman numbers

Example:

<!DOCTYPE html>
<html>
<body>

<h2>Ordered List with Numbers</h2>

<ol type="enter your type">


<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>

VARIOUS TAGS USED WHILE OPERATING IN LISTS :


 Use the HTML <ul> element to define an unordered list
 Use the CSS list-style-type property to define the list item marker
 Use the HTML <ol> element to define an ordered list
 Use the HTML type attribute to define the numbering type
 Use the HTML <li> element to define a list item
 Lists can be nested inside lists

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy