KnowledgeBoat Logo
|

Computer Applications

Write the difference between <ol> and <ul> tags in HTML. Also write suitable examples of each to illustrate the difference.

HTML Advanced Features

8 Likes

Answer

Unordered listOrdered list
In an unordered list, each item is displayed with a bullet.In an ordered list, each item is displayed along with the numbers or letters instead of bullets.
<ul> and </ul> tags are used.<ol> and </ol> tags are used.
For example
<UL>
<LI> Apples </LI>
<LI> Oranges </LI>
<LI> Grapes </LI>
</UL>
For example
<OL>
<LI> Apples </LI>
<LI> Oranges </LI>
<LI> Grapes </LI>
</OL>
Output
  • Apples
  • Oranges
  • Grapes
Output
  1. Apples
  2. Oranges
  3. Grapes

Answered By

8 Likes


Related Questions