Numbering
Numbering
HTML List is a collection of related infomation. The lists can be ordered or underdered
depending on the requirement. In html we can create both order and unorder lists by
using <ol> and <ul> tags. Each type of list can be decorated using porper attributes or CSS also.
There is one more list which is description list - HTML <dl>, <dt> & <dd> tag are used to
create description lists.
Lists in HTML
As HTML offers three ways for specifying lists of information namely ordered, unordered, and
definition lists. All lists must contain one or more list items.
Tag Description
Unorder lists are marked with bullet points, by using html <ul> & <li> tag we can create a
unorder list. This is also know as unorder list.
Example
<html>
<head>
<title>HTML List</title>
</head>
<body>
<h2>Example of HTML List</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Java</li>
<li>JavaFX</li>
</ul>
</body>
</html>
Order list are marked with numbers by default, we can xhnage the number into alphabet, roman
numbers, etc. By using html <ol> & <li> tag we can create a order list and using type attribute
we can change the default numeric marking.
<html>
<head>
<title>HTML List</title>
</head>
<body>
<h2>Example of HTML List</h2>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Java</li>
<li>JavaFX</li>
</ol>
</body>
</html>
HTML Description Lists
Description list is list of items with description, to create a desccription list we can
use <dl>, <dt> & <dd> tag.
<html>
<head>
<title>HTML List</title>
</head>
<body>
<h2>Example of HTML List</h2>
<dl>
<dt>HTML</dt>
<dd>HyperText markup languague</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheet</dd>
<dt>JS</dt>
<dd>JavaScript</dd>
</dl>
</body>
</html>