Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use tick / checkmark symbol (✓) instead of bullets in unordered list?

I have a list where I want to add tick symbol before list text. Is there any CSS that can help me to apply this way?

✓ this is my text ✓ this is my text ✓ this is my text ✓ this is my text ✓ this is my text ✓ this is my text 

Note: I want this in this type of HTML code

<ul>    <li>this is my text</li>    <li>this is my text</li>    <li>this is my text</li>    <li>this is my text</li>    <li>this is my text</li>  </ul>
like image 323
Stack-overflow-hero Avatar asked Dec 07 '15 19:12

Stack-overflow-hero


People also ask

How do I change the bullet style in an unordered list?

For creating an unordered list with circle bullets, use CSS property list-style-type. We will be using the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <ul> tag, with the CSS property list-style-type to add square bullets to an unordered list.

How do I insert a tick symbol in HTML?

In the web page's HTML source code, add one of the following Unicode HTML entities, depending on the type of check mark you want to insert. &#9745; - inserts the " ☑ " symbol. &#10003; - adds the " ✓ " symbol. &#10004; - inserts the " ✔ " symbol.

How do you add a checkmark in CSS?

A checkmark icon can be created with CSS by following these steps : Taking a container element, and using its ::before and ::after pseudo-elements to create two straight lines. Rotate both pseudo-elements to make the element look like a checkmark.


1 Answers

You can use a pseudo-element to insert that character before each list item:

ul {    list-style: none;  }    ul li:before {    content: '✓';  }
<ul>    <li>this is my text</li>    <li>this is my text</li>    <li>this is my text</li>    <li>this is my text</li>    <li>this is my text</li>  </ul>
like image 91
Josh Crozier Avatar answered Oct 24 '22 04:10

Josh Crozier