Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Заголовок документа</title>
<style>
body {
/* Set "section" to 0 */
counter-reset: section;
}
h1 {
/* Set "subsection" to 0 */
counter-reset: subsection;
}
h1::before {
counter-increment: section;
content: "Book " counter(section) ": ";
}
h2::before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) " ";
}
</style>
</head>
<body>
<h1>HTML</h1>
<h2>HTML Basics</h2>
<h2>HTML Templates</h2>
<h2>HTML References</h2>
<h2>HTML Tags</h2>
<h1>CSS</h1>
<h2>CSS Basics</h2>
<h2>CSS References</h2>
<h2>CSS Advanced</h2>
<h2>CSS Guides</h2>
<h2>CSS Selectors</h2>
<h2>CSS Properties</h2>