Master HTML Lists with Easy Tutorials from Tutorialspoint

Welcome to our comprehensive tutorial on HTML lists! In this guide, we will explore the different types of lists that HTML offers and how to create and style them. By the end, you'll have a solid understanding of how to use lists to organize and present information on your web pages.

HTML Cheat Sheet 📄✨ Quick Guide for Beginners
HTML Cheat Sheet 📄✨ Quick Guide for Beginners

HTML provides us with three types of lists to structure and group related data. These are unordered lists, ordered lists, and description lists. Let's dive into each of these, starting with unordered lists.

✅ Create Lists in HTML
✅ Create Lists in HTML

Unordered Lists

Unordered lists are used when you want to group a collection of items that don't have a particular order. They are created using the

    and
  • tags. The
      tag wraps the unordered list, and the
    • tag defines each list item. Here's a simple example:

a screen shot of a web page with the words'html input types '
a screen shot of a web page with the words'html input types '

```html

  • Item 1
  • Item 2
  • Item 3

```

Basics of HTML
Basics of HTML

List Styling

By default, browsers style unordered lists with filled bullets. But you can change these bullets and apply your own styles using CSS. Here's how you can change the bullet type to a hollow circle:

```html

  • Item 1
  • Item 2
  • Item 3
HTML Full Notes for Beginners 💻
HTML Full Notes for Beginners 💻

```

Nested Lists

HTML also allows you to create nested lists, which can be useful for creating outlines or hierarchical content. Here's an example of a nested unordered list:

an image of a web page with the text'html input types'on it
an image of a web page with the text'html input types'on it

```html

  • Parent Item 1
    • Child Item 1
    • Child Item 2

  • Parent Item 2
  • HTML Attributes
    HTML Attributes
    a computer screen with the text html and an image of a web page on it
    a computer screen with the text html and an image of a web page on it
    List of HTML Tags
    List of HTML Tags
    making html easy for you guysss
    making html easy for you guysss
    the different types of web pages are shown
    the different types of web pages are shown
    Complete Beginner HTML Master Notes
    Complete Beginner HTML Master Notes
    a black and orange poster with text that says,'html chat sheet'on it
    a black and orange poster with text that says,'html chat sheet'on it
    Quick HTML Tags Cheat Sheet
    Quick HTML Tags Cheat Sheet
    HTML,CSS JAVASCRIPT cheatsheet
    HTML,CSS JAVASCRIPT cheatsheet
    the basics of html for web designers and bloggers, including instructions on how to use them
    the basics of html for web designers and bloggers, including instructions on how to use them
    Complete Beginner HTML Master Notes
    Complete Beginner HTML Master Notes
    Master HTML in 10 Minutes 💻 Beginner Cheatsheet
    Master HTML in 10 Minutes 💻 Beginner Cheatsheet
    HTML Basic Tables
    HTML Basic Tables
    a diagram showing the different types of web pages and what they are used to create them
    a diagram showing the different types of web pages and what they are used to create them
    Create HTML Lists From JSON Data
    Create HTML Lists From JSON Data
    an info sheet with the text basic html structure in blue and white, on top of it
    an info sheet with the text basic html structure in blue and white, on top of it
    HTML Cheat Sheet for Beginners (Quick Guide)
    HTML Cheat Sheet for Beginners (Quick Guide)
    HTML Cheatsheets
    HTML Cheatsheets
    a handwritten diagram with the words html and an image of a computer screen on it
    a handwritten diagram with the words html and an image of a computer screen on it
    HTML Tags — List of all HTML Tags with Examples TutorialBrain
    HTML Tags — List of all HTML Tags with Examples TutorialBrain

    ```

    Ordered Lists

    Ordered lists are similar to unordered lists, but they display list items with a number instead of a bullet. They are used when you want to Steps or when the order of items matters. They are created using the

      and
    1. tags. Here's an example:

    ```html

    1. Step 1
    2. Step 2
    3. Step 3

    ```

    List Types

    Just like with unordered lists, you can change the type of numbers used in an ordered list. Here are a few examples:

    ```html

    1. Item A
    2. Item B
    1. Item I
    2. Item II

    ```

    Nested Ordered Lists

    You can also nest ordered lists, which can be useful for creating ordered outlines or for indicating sub-steps in a process. Here's an example:

    ```html

    1. Parent Item 1
      1. Child Item 1
      2. Child Item 2

  • Parent Item 2
  • ```

    Description Lists

    The final type of list in HTML is the description list, which is used to pair labels and descriptions. They are created using the

    ,
    , and
    tags. Let's take a look at an example:

    ```html

    Term 1
    Description of term 1
    Term 2
    Description of term 2
    ```

    Description List Styling

    Description lists are typically displayed with the terms on the left and the descriptions on the right. You can use CSS to style these lists as you see fit.

    And there you have it! You now know how to create and style HTML lists. Practicing these examples and exploring more use cases will help you become more comfortable with this fundamental web development topic. Happy coding!

    Related Articles

    How To Solve Rubik's Cube 3x3 Step By Step In Hindi Html Tutorial Replit Html Tutorial Title Html Table Tutorialspoint Html Tutorialspoint Pdf Free Download How To Solve Rubik's Cube 3x3 Step By Step For Kids Www Tutorialspoint Com Html Pdf Tutorialspoint Down Html By Tutorialspoint Html Gcfglobal Tutorials