Here is another CSS solution. It takes fewer lines of code.

ul li:before {
  content: '\2713';
  display: inline-block;
  color: red;
  padding: 0 6px 0 0;
}

ul li {
  list-style-type: none;
  font-size: 1em;
}
<ul>
  <li>test1</li>
  <li>test</li>
</ul>

Answer from Kheema Pandey on Stack Overflow
Top answer
1 of 16
110

Here is another CSS solution. It takes fewer lines of code.

ul li:before {
  content: '\2713';
  display: inline-block;
  color: red;
  padding: 0 6px 0 0;
}

ul li {
  list-style-type: none;
  font-size: 1em;
}
<ul>
  <li>test1</li>
  <li>test</li>
</ul>

2 of 16
109

You can draw two rectangles and place them next to each other. And then rotate by 45 degrees. Modify the width/height/top/left parameters for any variation.

DEMO 1

.checkmark {
  display: inline-block;
  width: 22px;
  height: 22px;
  -ms-transform: rotate(45deg); /* IE 9 */
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
  transform: rotate(45deg);
}

.checkmark_stem {
  position: absolute;
  width: 3px;
  height: 9px;
  background-color: #ccc;
  left: 11px;
  top: 6px;
}

.checkmark_kick {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: #ccc;
  left: 8px;
  top: 12px;
}
<span class="checkmark">
  <div class="checkmark_stem"></div>
  <div class="checkmark_kick"></div>
</span>

DEMO 2 (With circle)

.checkmark {
  display: inline-block;
  width: 22px;
  height: 22px;
  -ms-transform: rotate(45deg); /* IE 9 */
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
  transform: rotate(45deg);
}

.checkmark_circle {
  position: absolute;
  width: 22px;
  height: 22px;
  background-color: green;
  border-radius: 11px;
  left: 0;
  top: 0;
}

.checkmark_stem {
  position: absolute;
  width: 3px;
  height: 9px;
  background-color: #fff;
  left: 11px;
  top: 6px;
}

.checkmark_kick {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: #fff;
  left: 8px;
  top: 12px;
}
<span class="checkmark">
  <div class="checkmark_circle"></div>
  <div class="checkmark_stem"></div>
  <div class="checkmark_kick"></div>
</span>

🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Selectors › ::checkmark
checkmark - CSS - MDN Web Docs - Mozilla
November 7, 2025 - The ::checkmark pseudo-element targets the checkmark placed inside a customizable select element's currently-selected <option>. It is only available to target when the originating element has a picker and has base appearance set on it via the appearance property base-select value.
🌐
CSS-Tricks
css-tricks.com › put-checkmarks-next-to-visted-links-with-pure-css
"Checkmark" Your Visited Links with Pure CSS | CSS-Tricks
September 28, 2011 - The “trick” itself (the css) isn’t anything new but the concept of placing a checkmark before the link is both creative and useful.
🌐
CSS-Tricks
css-tricks.com › almanac › pseudo-selectors › c › checkmark
::checkmark | CSS-Tricks
September 30, 2025 - The ::checkmark pseudo-element is typically used to set styles on an element’s content property.
🌐
Toptal
toptal.com › designers › htmlarrows › symbols › check-mark
Check Mark HTML Symbol, Character and Entity Codes — HTML Arrows
HTML symbol, character and entity codes, ASCII, CSS and HEX values for Check Mark, plus a panoply of others.
🌐
CodePen
codepen.io › gliesche › pen › ZQyPeV
Pure CSS checkmark
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset.
🌐
GeeksforGeeks
geeksforgeeks.org › web templates › how-to-draw-a-checkmark-tick-using-css
How to draw a checkmark / tick using CSS ? - GeeksforGeeks
December 29, 2023 - Adjust margins for proper spacing, completing the checkmark design. Example: In this example, we will see how to design a checkbox using HTML and CSS. ... <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { display: flex; justify-content: center; align-items: center; flex-direction: column; } .check { height: 50px; width: 18px; border-bottom: 10px solid green; border-right: 10px solid green; transform: rotate(45deg); margin: 20px; } </style> </head> <body> <h1 style="color: green;"> GeeksforGeeks </h1> <div class="check"></div> </body> </html>
🌐
CodePen
codepen.io › lajlev › pen › DyJygd
CSS Checkmark
@import "compass/css3"; body { text-align:center; } .checkmark{ display:inline-block; &:after{ /*Add another block-level blank space*/ content: ''; display: block; /*Make it a small rectangle so the border will create an L-shape*/ width: 3px; height: 6px; /*Add a white border on the bottom and left, creating that 'L' */ border: solid #000; border-width: 0 2px 2px 0; /*Rotate the L 45 degrees to turn it into a checkmark*/ transform: rotate(45deg); } } !
🌐
SitePoint
sitepoint.com › html & css
Replacement content with the checkmark - HTML & CSS - SitePoint Forums | Web Development & Design Community
June 26, 2020 - I try to make styling for a circle when it is status CHECKED. How to add also checkmark in this case? As I understand it should be replaced :before with the new content: font-family: FontAwesome; content: "\f09…
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com › how-to-create-a-checkmark-tick-with-css
How to Create a Checkmark / Tick with CSS
March 12, 2021 - We can create a customized checkmark using CSS. The following examples illustrate this effect − ... <!DOCTYPE html> <html> <style> div { margin: 2%; position: relative; width: 40px; height: 40px; box-shadow: inset 0 0 12px lightblue; } div::before { content: ""; position: absolute; width: 8px; top: 50%; height: 50%; border-radius: 2px; background-color: rgb(123,45,20); transform: translateX(12px) rotate(-45deg); transform-origin: left bottom; z-index: +1; } div::after { content: ""; position: absolute; bottom: 0; height: 8px; width: 100%; border-radius: 2px; background-color: rgb(200,52,120); transform: translateX(12px) rotate(-45deg); transform-origin: left bottom; } </style> <body> Custom mark!
🌐
UsefulAngle
usefulangle.com › post › 236 › css-checkmark-tick
How to Create a Checkmark / Tick with CSS - UsefulAngle
October 11, 2019 - A checkmark or a tick icon can be created with pure CSS by drawing two straight lines and rotating them.
🌐
HTML Symbols
htmlsymbols.xyz › unicode › U+2713
✓ - Check mark (U+2713) - HTML Symbols
Detailed information about the Unicode character 'Check mark' with code point U+2713 that can be used as a symbol or icon on your site.
🌐
CodePen
codepen.io › ukristen › pen › KpPNZV
CSS checkmarks
Minimize CSS Editor · Fold All · Unfold All · ul.checkmark li font-size: 16px // modify to test margin-bottom: 1em list-style-type: none padding: .25em 0 0 2.5em position: relative &:before content: " " display: block border: solid .8em orange border-radius: .8em height: 0 width: 0 position: absolute left: .5em top: 40% margin-top: -.5em &:after content: " " display: block width: .3em height: .6em border: solid #fff border-width: 0 .2em .2em 0 position: absolute left: 1em top: 40% margin-top: -.2em -webkit-transform: rotate(45deg) -moz-transform: rotate(45deg) -o-transform: rotate(45deg) transform: rotate(45deg) !
🌐
GitHub
github.com › w3c › csswg-drafts › issues › 10908
[css-ui] Pseudo-elements for checkmark and dropdown icon for appearance:base `<select>` · Issue #10908 · w3c/csswg-drafts
September 17, 2024 - In this issue, I proposed putting option::before in the UA stylesheet to create checkmarks and select::after to create a dropdown icon. It was suggested that we could create new pseudo-elements for these instead like ::check and ::select...
Author   josepharhar
🌐
ClickNathan
clicknathan.com › page
Checkmarks and Xs with Pure CSS (Using Pseudo Elements) | ClickNathan - Handmade Websites
July 18, 2014 - A check mark created purely from pseudo elements and CSS. Let’s say someone completes a form on your website and you then show them a confirmation message. Maybe you want to show a checkbox to the left of that message but don’t want to bulk ...
🌐
WP SITES
wpsites.net › home › add checkmark/ticks to your ul list
Add Checkmark/Ticks To Your ul List
February 15, 2018 - Add the following CSS to your style.css file. li { list-style-type: none!important; } ul { margin-bottom: 20px; margin-left: 10px; } ul li { color: #232525; font-family: 'Poppins', sans-serif; font-size: 14px; font-size: 1.4rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; } ul.checkmark { margin-top: 20px; } ul.checkmark li:before { font-size: 48px; font-size: 4.8rem; vertical-align: middle; } ul.checkmark li:before { color: #e85555; content: "\f3fd"; display: inline-block; font-family: 'ionicons'; margin-left: -36px; width: 36px; } ul.checkmark li { line-height: 1; padding: 8px 0 8px 36px; } The code comes from the Digital Pro child theme by StudioPress ·
🌐
GeneratePress
generatepress.com › forums › topic › turn-bullet-points-into-checkmark-image
Turn Bullet Points into Checkmark Image – GeneratePress
August 26, 2020 - Is it possible to make the checkmark a certain color? What would I add to the CSS to do that? August 26, 2020 at 8:44 am #1419192 · Leo · Staff Customer Support · Yup give that a shot first and guide me to the page. August 26, 2020 at 9:11 am #1419228 · John · It added bullet point in my menu though? 🙁 · http://www.drysolutions.com/mold-prevention/ August 26, 2020 at 9:54 am #1419313 · Leo · Staff Customer Support · Try this instead: .entry-content ul { list-style: none; } .entry-content ul li:before { content: '✓'; color: #000; } August 26, 2020 at 11:02 am #1419414 ·
🌐
StudyX
studyx.ai › homework › 100656309-what-change-must-be-made-to-the-css-code-to-add-a-checkmark-icon-inside-the-checkbox-when
What change must be made to the CSS code to
June 16, 2024 - Checked State: When the checkbox is checked (input[type="checkbox"]:checked), the ::before pseudo-element of the .checkmark is used to insert a checkmark symbol ("✓"). The content property is set to "✓" to display the checkmark, and its position is adjusted to appear in the center of the ...
🌐
Linux Hint
linuxhint.com › how-to-draw-a-checkmark-tick-using-css
How to Draw a Checkmark/Tick Using CSS
March 21, 2023 - Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
freeCodeCamp
freecodecamp.org › news › checkmark-symbol-html-for-checkmark-unicode
Checkmark Symbol – HTML for Checkmark Unicode
April 12, 2022 - The Unicode character for showing a checkmark is U+2713. If you decide to use this Unicode to show a checkmark in HTML and you type it in like that, what you type is shown like this: <h1>Languages of the web</h1> <h3>U+2713 HTML</h3> <h3>U+2713 CSS</h3> <h3>U+2713 JavaScript</h3> <h3>U+2713 PHP</h3>