<!DOCTYPE html>
<html>
<head>
<title>Example of HTML Ordered List</title>
</head>
<body>
<ol>
<li>Maths</li>
<li>Physics</li>
<li>Computer Science</li>
<li>Language</li>
</ol>
</body>
</html>
Attributes | Description | Example and Output |
---|---|---|
type | Used to specify type of numbering like 1/a/A/I/i. Default type is ‘1’. | Example: <ol type="a"> <li>Maths</li> <li>Physics</li> <li>Language</li> </ol> Output: a. Maths b. Physics c. Language |
start | Using this attribute any value can be set as the starting position. | Example: <ol type="i" start="4"> <li>Maths</li> <li>Physics</li> <li>Language</li> </ol> Output: iv. Maths v. Physics vi. Language |
value | Using this attribute the numbering sequence can be changed in the middle of an ordered list. It is to be specified with the <li> tag. | Example: <ol> <li type="a" value="3">Maths</li> <li value="5">Physics</li> </ol> Output: c. Maths 5. Physics |
<!DOCTYPE html>
<html>
<head>
<title>Example of HTML Ordered List</title>
</head>
<body>
<ul>
<li>Maths</li>
<li>Physics</li>
<li>Computer Science</li>
<li>Language</li>
</ul>
</body>
</html>
Attribute | Description | Example and Output |
---|---|---|
type | Used to specify type of list item like bullet, circle and square. Default type is bullet. | Example: <ul type="square"> <li>Maths</li> <li>Physics</li> <li>Language</li> </ul> Output: |
<!DOCTYPE html>
<html>
<head>
<title>Example of HTML Definition List</title>
</head>
<body>
<dl>
<dt><b>jQuery</b></dt>
<dd>jQuery is a JavaScript Library.</dd>
<dt><b>AngularJS</b></dt>
<dd>AngularJS is a JavaScript framework.</dd>
</dl>
</body>
</html>