HTML List
There are three list types in HTML
<ol> - An ordered list.
<dl> - A definition list.
Unordered List - Unordered (bulleted) lists are used when a set of items can be placed in any order.
Unordered List makes use of following tags
<ul> , </ul> , <li> , </li>
Example
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul>
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ul>
</body>
</html>
The type Attribute
- <ul type="square">
- <ul type="disc">
- <ul type="circle">
Example : <ul type="square">
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul type="square">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ul>
</body>
</html>
Example : <ul type="disc">
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul type="disc">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ul>
</body>
</html>
Example : <ul type="circle">
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul type="circle">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ul>
</body>
</html>
Ordered List - You can Use ordered lists anywhere you want to show a specific order for the list items
ordered List makes use of following tags
<ol> , </ol> , <li> , </li>
Example
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol>
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ol>
</body>
</html>
Types of Ordered Lists
- <ol type="1">
- <ol type="I">
- <ol type="i">
- <ol type="a">
- <ol type="A">
Example : <ol type="1">
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type="1">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ol>
</body>
</html>
Example : <ol type="I">
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type="I">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ol>
</body>
</html>
Example : <ol type="i">
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type="I">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ol>
</body>
</html>
Example : <ol type="A">
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type="I">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ol>
</body>
</html>
Example : <ol type="a">
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type="I">
<li>List 01</li>
<li>List 02</li>
<li>List 03</li>
<li>List 04</li>
</ol>
</body>
</html>
Definition Lists - These are lists of items that have two parts, a term to be defined and the definition
Definition List makes use of following tags.
<dl> , </dl> , <dt> , </dt> , <dd> , </dd>
Example
<html>
<head>
<title>HTML Definition List</title>
</head>
<body>
<dl>
<dt>Unordered List</dt>
<dd>Lists are used when a set of items can be placed in any order</dd>
<dt>Ordered List</dt>
<dd>To show a specific order for the list items</dd>
</dl>
</body>
</html>
HTML List
Reviewed by Unknown
on
12:05 AM
Rating:
No comments: