The only pure CSS way is with counters:
ol {
counter-reset: item;
list-style-type: none;
}
ol li:before {
content: 'Q' counter(item, decimal) '. ';
counter-increment: item;
}
You cannot achieve this besides using CSS counters (which were designed specifically for such use cases!) or JavaScript.
By the way, it’s decimal
, not numbered
.