Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to modify the style in list(ordered list and unordered list) in HTML?

Tags:

html

css

How can I change the style in list?

1. First
2. Second
3. Third

I want my listing to look something like

1) First
2) Second
3) Third

Now the question is how to change dot . to parenthesis ) or something we like??

I am beginner to HTML so the question seem a quite awkward. Please help me with this question.

like image 612
Aatish Sai Avatar asked Dec 11 '22 11:12

Aatish Sai


1 Answers

Here you go.

WORKING DEMO

The HTML:

<ul style="list-style-type:decimal;">
   <li>First</li>
   <li>Second</li>
   <li>Third</li>
</ul>

The CSS:

li{
   position: relative;
   }
li:before{
   position: absolute;
   left: -13px;
   content: ')';
   background:white;}

Hope this helps.

like image 116
Nitesh Avatar answered Jan 21 '23 16:01

Nitesh