counter counter を使う際の注意。 counter とは 簡単に言うと自動的に連番を振る機能。 詳しくはこちらに書いてあります。 Firefox における注意 h1:before { content: "Chapter " counter(chapter) ". "; counter-increment: chapter; /* chapter のカウントを増やす */ counter-reset: section; /* section のカウントをリセットする */ } h2:before { content: counter(chapter) "." counter(section) " "; counter-increment: section; /* section のカウントを増やす */ } 上記のようなソースを実際にブラウザに表示させると、以下のようになります