HTML Lists and their types


Today we will talk about lists, there are three types of lists on HTML.
In HTML there are 3 types of lists.
  1. Ordered Lists
  2. Unordered list
  3. Definition list
1: Ordered Lists:
We use this list when we want our list in an orderly manner with Numbers or alphabets. <ol></ol> tags are used for creating an ordered list.
Every list have list items which comes in <li></li> tags
Above code is an example of ordered list by default ordered lists are numeric but you can change it's style by using attributes.
As you can see in the Image above output of the code, we just created a list in numeric order.

2: Un-ordered lists:
Un ordered list are followed by bullets, squares and many different type of symbols which you can chose, by default it's bullets. <ul></ul> tags are use to create Un-ordered lists.
Above code is an example of Un-ordered list.

In the output above you can see that there are bullets or you can say Discs you can change them into squares, circles we will talk about that later.
3: Definition lists:
Definition lists are also called description lists. <dl></dl> tags are used for creating Definition lists. they are consists on series of definitions.
Above code is an example of Definition lists.

By seeing the output above i hope it's clear why we call it pairs of descriptions. As we have three heading here HTML, CSS and AJA and we are defining them.

If you have any queries regarding this tutorial don't forget to ask us and you are always welcome to share your knowledge with others.
Previous
Next Post »