Skip to content

Instantly share code, notes, and snippets.

@aleph-naught2tog
Last active March 7, 2020 21:18
Show Gist options
  • Save aleph-naught2tog/c14bf514b13055b81218a105e067e51b to your computer and use it in GitHub Desktop.
Save aleph-naught2tog/c14bf514b13055b81218a105e067e51b to your computer and use it in GitHub Desktop.
counters
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
>
<title>Document</title>
</head>
<body>
<style>
main {
counter-reset: h4_counter;
}
main > h4:before {
counter-increment: h4_counter;
content: counter(h4_counter, upper-roman) ". "
}
</style>
<main>
<h4>one</h4>
<h4>two</h4>
<h4>three</h4>
<section>nesting...
<h4>nested one</h4>
</section>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment