Ask Your Question
1

How can a border be added to a list using Html/Css?

asked 2023-05-07 16:26:02 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-07 16:49:02 +0000

djk gravatar image

To add a border to a list using Html/Css, you can use the following code:

Html

<ul class="list-border">
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

Css

.list-border {
  border: 1px solid black;
  padding: 10px;
}

This will add a black border around the list and add some padding to give it some space. You can adjust the color, width, and padding as needed to fit your design.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-07 16:26:02 +0000

Seen: 17 times

Last updated: May 07 '23