x
 
<!DOCTYPE html>
<html>
<head>
<style>
body {
  /* 将 "section" 设置为 9 */
  counter-set: section 9;
}
h1 {
  /* 将 "subsection" 设置为 0 */
  counter-set: subsection 0;
}
h1::before {
  counter-increment: section;
  content: "章节 " counter(section) ": ";
}
h2::before {
  counter-increment: subsection;
  content: counter(section) "." counter(subsection) " ";
}
</style>
</head>
<body>
<h1>HTML 和 CSS</h1>
<h2>HTML 教程</h2>
<h2>CSS 教程</h2>
<h2>Bootstrap 教程</h2>
<hr>
<h1>JavaScript</h1>
<h2>JavaScript 教程</h2>
<h2>jQuery 教程</h2>
<h2>JSON 教程</h2>
<hr>
<h1>服务器端</h1>
<h2>SQL 教程</h2>
<h2>PHP 教程</h2>
</body>
</html>