欲しいものはわかっていますが、それを最もうまく表現する方法がわからないので、ご容赦ください。
ページの見出しと、見出しに続く段落に番号を付けました。段落のテキストを見出しのタイトルの開始と同じに揃え、見出しの番号を右に揃えたいと思います。たとえば、見出しのタイトルの 0.5em です。
等幅フォントの例を次に示します。
1. Introduction
This is the beginning of the introduction.
1.1. Sub header
Another paragraph here and when it comes to having
another line, it is indented as the first one.
1.1.1. Sub-sub header
Notice how the headlines and paragraphs are exactly
aligned, whereas the numbers in the headlines are shifted
to the right ?
1.2. Sub header 2
I'm sure you get the picture...
HTML/CSS でこれを達成する最良の方法は何ですか? テーブルを使用するのは簡単ですが、よりクリーンな方法があれば別の方法で使用したいと考えています。