Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> body { /* Set "section" to 0 */ counter-reset: section; } h2 { /* Set "subsection" to 0 */ counter-reset: subsection; } h2::before { counter-increment: section; content: "Book " counter(section) ": "; } h3::before { counter-increment: subsection; content: counter(section) "." counter(subsection) " "; } </style> </head> <body> <h2>HTML</h2> <h3>HTML Basics</h3> <h3>HTML Templates</h3> <h3>HTML References</h3> <h3>HTML Tags</h3> <h2>CSS</h2> <h3>CSS Basics</h3> <h3>CSS References</h3> <h3>CSS Advanced</h3> <h3>CSS Guides</h3> <h3>CSS Selectors</h3> <h3>CSS Properties</h3> </body> </html>