Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> body { /* "my-counter" to 0 */ counter-reset: my-counter; } h2::before { /* "my-counter" by 1 */ counter-increment: my-counter -1; content: "Section " counter(my-counter) ". "; } </style> </head> <body> <h2>HTML Tutorial</h2> <h2>CSS Tutorial</h2> <h2>JavaScript Tutorial</h2> <h2>PHP Tutorial</h2> </body> </html>