HTML Lists

Ratings:
(4)
Views:205
Banner-Img
  • Share this blog:

Lists

As you can see, all this tag does is draw a line across you content, and used properly, its results can be outstanding.

You can list out your items, subjects or menu in the form of a list. HTML gives you three different types of lists.

<ul> - An unordered list. This will list items using bullets.

<ol>- A ordered list. This will use different schemes of numbers to list your items.

<dl>- A definition list. This is arrange your items in the same way as they are arranged in a dictionary.

HTML Unordered Lists

An unordered is  a collection of related items that have no special order or sequence. The most common unordered list you will find on the Web is a collection of hyperlinks to other documents.

This list is created by using <ul> tag. Each item in the list is marked with a bullet. The bullet itself comes in three flavors: Squares, discs, and circles. The default bullet displayed by most web browsers is the traditional full disc.

One Movie list is given below.

<center>

<h2> Movie List</h2>

</center>

<ul>

<li> Ram Teri Ganga Meli</li>

<li> Mera Naam Jocker</li>

<li>Titanic</li>

<li> Ghost in the ship</li>

</ul>

This will produce following result:

Movie List

  • Ram Teri Ganga Meli
  • Mera Naam Jocker
  • Titanic
  • Ghost in the ship

You can use type attribute to specify the type of bullet you like. By default its is a disc. Follwing are the possible way:

<ul type=”square”>

<ul type=”disc”>

<ul type=”circle”>

<ul type=”square”> <ul type=”disc”> <ul type=”circle”>
  • Hindi
  • English
  • Maths
  • Physics
  • Hindi
  • English
  • Maths
  • Physics
  • Hindi
  • English
  • Maths
  • Physics
   

HTML Ordered Lists

The typical browser formats the contents of an ordered list just like an unordered list, except that the items are numbered instead of bulleted. The numbering starts at one and is incremented by one for each successive ordered list element tagged with<li>

This list is created by using <ol> tag. Each item in the list is marked with a number.

One Movie list  is given below:

<center>

<h2>Movie List</h2>

</centre>

<ol>

<li> Ram teri Ganga Meli</li>

<li>Mera Naam Jocker</li>

<li>Titanic</li>

<li>Ghost in the ship</li>

</ol>

This will produce following result.

Movie List

  1. Ram Teri Ganga Meli
  2. Mera Naam Jocker
  3. Titanic
  4. Ghost in the ship

You can use type attribute to specify the type of numbers you like. By default its is a generic members, Following are the other possible way:

<ol type=”I”> - Upper-Case Numberals

<ol type=”a”> - Lower-Case Letters.

<ol type=”i”> - Upper-Case Letters.

<ol type=”i”> <ol type=”i”> <ol type=”a”> <ol type = “A”>
  1. Hindi
  2. Hindi
  3. Hindi
  4. Hindi
  5. English
  6. English
  7. English
  8. English
     
       
  • Maths
  • Maths
 
  1. Maths
  2. Maths
  3. Physics
  4. Physics
  5. Physics
  6. Physics
 
       

You can user start attribute to specify the beginning of any index. By default it’s a first number or character. In the following example index starts from 5.

<center>

<h2>Movie List</h2>

</centre>

<ol start=”5”>

<li> Ram Teri Ganga Meli</li>

<li> Mera Naam Jocker</li>

<li> Titanic</li>

<li> Ghost in the chip</li>

</ol>

This will produce following result:

Movie List

  1. Ram Teri Ganga Meli
  2. Mera Naam Jocker
  3. Titanic
  4. Ghost in the ship

HTML Definition Lists

HTML and XHTML also support a list style entirely different from the ordered and unordered lists we have discussed so far-definition lists. Like the entries you find in a dictionary or encyclopedia, complete with text, pictures, and other multimedia elements, the Definition List is the ideal way to present a glossary, list of terms, or other name/value list.

Definition List makes use of following three tags.

<dl> - Defines the start of the list

<dt>- A term

<dd> - Term definition

</dl> - Defines the end of the list

Example

<dl>

<dt><b>HTML</b></dt>

<dd>This stands for Hyper Text Markup Language</dd>

<dt><b>HTTP</b></dt>

<dd> This stands for Hyper Text Transfer Protocol</dd>

</dl>

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox