Home » CSS numbering using :before

CSS numbering using :before

See the below example to add numbering using :before

And if you want to style all the input fields.
ul {
   counter-reset: number;
}
ul li {
   counter-increment: number;
}
ul li::before {
   content: counter(number)" ";
}
<ul>
  <li>List item<li>
  <li>List item<li>
  <li>List item<li>
  <li>List item<li>
  <li>List item<li>
</ul>

Example:

  • List item
  • List item
  • List item
  • List item
  • List item
About Author
Picture of W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!