Jump to content

Recommended Posts

Posted

The most common HTML lists are ordered and unordered lists:

An ordered list:

    The first list item
    The second list item
    The third list item


An unordered list:

    List item
    List item
    List item

 

HTML Unordered Lists

 

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

 

The list items are marked with bullets (typically small black circles).

<ul>
<li>Mr</li>
<li>Hot</li>
</ul> 

How the HTML code above looks in a browser:

 

  Mr

    Hot

 

HTML Ordered Lists

 

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

 

The list items are marked with numbers.

<ol>
<li>Mr</li>
<li>Hot</li>
</ol> 

 

How the HTML code above looks in a browser:

 

    Mr

    Hot

 

HTML Definition Lists

 

A definition list is a list of items, with a description of each item.

 

The <dl> tag defines a definition list.

 

The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):

<dl>
<dt>Mr</dt>
<dd>- hot fire</dd>
<dt>fire</dt>
<dd>- mr hot</dd>
</dl> 

 

How the HTML code above looks in a browser:

Mr
    - hot fire
Fire
    - mr hot

 

Basic Notes - Useful Tips

 

Tip: Inside a list item you can put text, line breaks, images, links, other lists, etc.

 

HTML List Tags

Tag 	Description
<ol> 	Defines an ordered list
<ul> 	Defines an unordered list
<li> 	Defines a list item
<dl> 	Defines a definition list
<dt> 	Defines an item in a definition list
<dd> 	Defines a description of an item in a definition list

 

 

Credits Olympus,Internet,ME.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock