---
title: "How to implement the List group using CSS3 and HTML?"  
description: "Create a list of items using HTML and styling them with CSS. You can add items as per your needs and add CSS styles to match your design."  
author: "Ashutosh Patel"  
published: 2024-06-07  
updated: 2024-06-07  
canonical: https://www.mindstick.com/blog/304325/how-to-implement-the-list-group-using-css3-and-html  
category: "css-css3"  
tags: ["html", "html lists", "css", "css styling"]  
reading_time: 2 minutes  

---

# How to implement the List group using CSS3 and HTML?

### List group using CSS3 and HTML

To implement a list group using HTML and CSS3, you can create and customize lists of items to achieve a group-like look.

## Example-

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>List Group Example using html and css</title>
<style>
  /* Basic styling for list items */
  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  li {
    padding: 10px;
    margin-bottom: 5px;
    background-color: whitesmoke;
    border: 1px solid lightgray;
    border-radius: 5px;
  }

  /* Styling for list group */
  .list-group {
    width: 300px;
    margin: 0 auto;
  }

  /* Styling for hover effect */
  li:hover {
    background-color: #e0e0e0;
  }
  /* Center the heading */
  .headting-text{
    display: flex;
    justify-content: center;
  }
</style>
</head>
<body>
  <div class="headting-text">
    <h3>List Group Example using HTML and CSS3</h3>
  </div>
  <div class="list-group">
    <ul>
      <li>List Item 1</li>
      <li>List Item 2</li>
      <li>List Item 3</li>
      <li>List Item 4</li>
      <li>List Item 5</li>
    </ul>
  </div>
</body>
</html>
```

## In the example above

- We create an unsorted list **(<ul>)** to hold list items.
- Each listed item **(<li>)** represents an item in the list set.
- We use basic styling to [reference](https://www.mindstick.com/forum/774/reference-what-does-this-error-mean-in-php) [objects](https://www.mindstick.com/forum/145447/what-are-objects) by providing padding, margins, [background color](https://www.mindstick.com/forum/12937/how-to-style-togglebutton-so-that-the-background-color-is-white), borders, and `border-radius` to achieve a group-like look.
- We use the `.list-group` class to style the [container](https://www.mindstick.com/forum/159610/how-to-connect-a-windows-container-to-a-service-running-on-localhost) of the list group. In this example we set **fixed** width and center horizontally at the page using `margin: 0 auto;`.
- Additionally, we add a hover [effect](https://yourviews.mindstick.com/view/81363/coronavirus-effect-on-american-farms-is-severe) to list objects to change the background color while hovering.

## Output-

![How to implement the List group using CSS3 and HTML?](https://www.mindstick.com/blogs/d8b50ede-749f-4d04-8db0-b1b49f5fe0dc/images/4c0807f0-3d2d-404b-b88f-3cb5837ca4a5.png)

You can still customize the look of the list group by changing the CSS style to suit your layout needs. Additionally, you can [add multiple](https://answers.mindstick.com/qa/115774/why-can-t-i-add-multiple-links-in-instagram-bio) [inventory](https://www.mindstick.com/articles/330314/5-inventory-management-techniques-to-boost-efficiency) items or edit the [content](https://www.mindstick.com/articles/13019/get-the-best-content-marketing-pricing-packages-for-your-brand) as needed.

**Also, Read:** [Explain all selectors in CSS3](https://www.mindstick.com/blog/304322/explain-all-selectors-in-css3)

---

Original Source: https://www.mindstick.com/blog/304325/how-to-implement-the-list-group-using-css3-and-html

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
