HTML Lists



These HTML Lists are used to add lists of information.

There are few lists tags are here

HTML List Tags

  • <ul> : An unordered list.
  • <ol> : An ordered list.
  • <dl> : A definition list.

HTML Unordered Lists

In this unordered Lists displays elements in bulleted formets.

There are four types of Attributes

S.NO Attribute Description
1 disc In this style the list items are marked with bullets.
2 circle In this style the list items are marked with circles.
3 square In this style the list items marked with squares.
4 none In this style the list items are not marked up.

Example

<!DOCTYPE html>
	<html>
	<head>
		<title>HTML ul tag</title>
	</head>
	<body>
		<h1>HTML Unordered List</h1>
		<ul>
			<li>One</li>
			<li>Two</li>
			<li>Three</li>
		</ul>
	</body>
	</html> 
	


Click on the "Run This Code" button to see how it works.


HTML Ordered Lists

This HTML Ordered Lists are can be alphabetical or numerical.

The numbering starts from one.

S.NO Attribute Description
1 compact In this style the list should be compacted.
2 reversed In this style the order will be descending.
3 type In this style you have select style.
4 start In this style which number the order will start.

Example

<!DOCTYPE html>
<html>
<head>
    <title>HTML ol tag</title>
</head>
<body>
    <h1>HTML Ordered List</h1>
    <ol>
        <li>One</li>
        <li>Two</li>
        <li>Three</li>
    </ol>
</body>
</html>


Click on the "Run This Code" button to see how it works.


HTML Definition Lists

In this HTML Definition Lists each list item contains two or more entries.

Example

<!DOCTYPE html>
	<html lang="en">
	<head>
		<title>Example of HTML dl tag</title>
	</head>
	<body>
		<h1>Definition List</h1>
		<dl>
			<dt>line1</dt>
			<dd>– definition1</dd>
			<dt>line</dt>
			<dd>– definition2</dd>
		</dl>
	</body>
	</html>
	


Click on the "Run This Code" button to see how it works.





HTML

Welcome HTML Getting Started HTML Elements HTML Attributes HTML Headings HTML Paragraphs HTML Links HTML Styles HTML Text Formatting HTML Tables HTML Images HTML Forms HTML Lists HTML Iframes HTML Comments HTML CSS HTML Colors HTML Classes HTML Id HTML javascript HTML Filepaths

HTML Advanced

HTML Doctypes HTML Validation HTML Validation HTML URL HTML URL Encode HTML URL Entities HTML Layout HTML Head HTML Meta HTML Scripts HTML Tags

HTML Media

HTML Media HTML Audio HTML Video HTML Plug-ins HTML Youtube

HTML Graphics

HTML Canvas HTML SVG