Table of Contents
HTML Lists
- The list is the way to present the data in vertical form.
- List are different types are present in HTML.
HTML Unordered List
- The <li> is used to start the plain bullets.
Note: The tag is used to separate each list item
HTML Unordered Lists type Attribute
- The type attribute for <ul> tag to specify the type of bullet you like.
- By default, it is a disc.
<ul type=”square”>
<ul type=”disc”>
<ul type=”circle”>
<html>
<head>
<tittle></tittle>
</head>
<body>
<p>HTML Unordered list</p>
<ul>
<li>New delhi</li>
<li>chandigarh</li>
<li>delhi</li>
<li>uttarpradesh</li>
<li>lucknow</li></ul>
</body>
</html>
HTML Ordered List
- The <ol> is used to start different schemes of numbers to list.
HTML ordered Lists type Attribute
-
The type attribute for <ol> tag to specify the type of numbering you like. By default, it is a number.
<ol type=”1″> – Default-Case Numerals.
<ol type=”I”> – Upper-Case Numerals.
<ol type=”i”> – Lower-Case Numerals.
<ol type=”a”> – Lower-Case Letters.
<ol type=”A”> – Upper-Case Letters.
<html>
<head>
<tittle></tittle>
</head>
<body>
<p>HTML Ordered list</p>
<ol>
<li>New delhi</li>
<li>chandigarh</li>
<li>delhi</li>
<li>uttarpradesh</li>
<li>lucknow</li></ol>
</body>
</html>
Ordered Lists start Attribute
- The start attribute for <ol> tag is used for the starting point of numbering you need.
<ol type=”1″ start=”4″> – Numerals starts with 4.
<ol type=”I” start=”4″> – Numerals starts with IV
<ol type=”i” start=”4″> – Numerals starts with iv.
<ol type=”a” start=”4″> – Letters starts with d.
<ol type=”A” start=”4″> – Letters starts with D.
<!DOCTYPE html>
<html>
<body>
<ol type="i" start="5">
<li>Cell</li>
<li>Cell</li>
<li>Cell</li>
<li>Cell</li>
</ol>
</body>
</html>
A definition list.
The definition list arranges your items in the same way as they are arranged in a dictionary.
The HTML Definition List is use three different tags.
- <dl> – Defines the start of the list.
- <dt> – A term.
- <dd> – Term definition.
- </dl> – Defines the end of the list.
<!DOCTYPE html>
<html>
<body>
<dl>
<dt>HTML</dt>
<dd>is a markup language.</dd>
<dt>Java</dt>
<dd>is a programming language .</dd>
<dt>JavaScript</dt>
<dd>is a scripting language.</dd>
</dl>
</body>
</html>