Paramclasses Academy - Blog

Blog Details

Creating a Simple Webpage with a List

Creating a Simple Webpage with a List

October 9, 2024

Code:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Favorite Foods</title>

</head>

<body>

    <h1>Welcome to My Food Blog</h1>

    <p>Here are my favorite foods categorized by cuisine type.</p>

 

    <h2>Top 3 Italian Foods</h2>

    <ol type="1">

        <li>Pizza</li>

        <li>Pasta</li>

        <li>Lasagna</li>

    </ol>

 

    <h2>Popular Indian Foods</h2>

    <ul>

        <li>Biryani</li>

        <li>Butter Chicken</li>

        <li>Paneer Tikka</li>

    </ul>

 

</body>

</html>

Explanation:

  • <ol> (Ordered List): An ordered list displays items in a numbered sequence.
  • <ul> (Unordered List):An unordered list displays items with bullet points instead of numbers.
  • Both lists use the <li> (list item) tag to define each item.
  • <ol type="1"> This is the default numbering style (1, 2, 3) for ordered lists.
  • We can also use type="a", type="i", type="A", type="I" instead of type="1"

Copyright © Paramwebinfo Academy.All Rights Reserved

Designed by PARAMWEBINFO