Let us discuss about the list tag in HTML.
Lists basically used for listing the given items one-by-one or in a points in unordered and ordered.
Example:
This is the lists perfect example:           
- egg.
Through this now we are creating a list with groceries.My mom says 
- Wheat -1kg [ Give like as in editor to perform ,<li>Wheat </li>],
- Oil-1litre [<li>Oil</li>],
- Potato [<li>Potato</li>].
Code:
  <!DOCTYPE html>
  <html>
  <head>
      <title>list</title>
  </head>
  <body>
      <li>Noodles</li>
      <li>Chicken rice</li>
      <li>egg rice</li>
  </body>
  </html>
Output:
- Noodles.
- Chicken rice.
- Egg rice.
Types of lists:
- Unordered lists.
- Ordered lists.
Ordered lists:
    Ordered list creating using <ol> tag.It is used mainly for sequenced steps ,this after you should follow this step .If you not follow the steps your exact food will not good. For example prepare a noodles 
- Pour a 1/2 vessel of water.
- Boil water for two minutes
- Put maggie into the water.
- After well boiled put masala.
- Close it for two minutes.
      If any steps change in this cause an unsatisfied dish.😑
Code:
  <ol>
        <li>Pour a 1/2 vessel of water.</li>
        <li>Boil water for two minutes</li>
        <li>Put maggie into the water.</li>
        <li>After well boiled put masala.</li>
        <li>Close it for two minutes.</li>
  </ol>
Unorder lists:
It is created using <ul> tag. In this we create list without order i.e. you can give first point to last point or last point to first point. In groceries you can give items randomly.
- Colgate
- pepsodent
- Dabur
- Britania
If you change the order it gives same items .
Code:
  <ul>
        <li>Colgate</li>
        <li>pepsodent</li>
        <li>Dabur</li>
        <li>Britania</li>
  </ul>

Post a Comment