Scripsit Andy Dingley:
<ol>
<li><h2>Foo</h2>
<p>Rhubarb rhubarb</p></li>
The main problem with this approach is that the numbers look rather
pathetic: by default, they appear in the basic font of the page, whereas
h2 is bold and bigger.
If you want the h2 to appear in normal font size but bold as by default
and the number to match this, you can use a little tricky CSS code that
sets the <ol> element (thereby the numbers as well) to bold but switches
this off for the paragraphs:
ol h2 { font-size: 100%; }
ol { font-weight: bold; }
ol p { font-weight: normal; }
Alternatively, you could make the numbers part of the headings and omit
the <ol> markup. It's not a sin to do so, especially in the absence of
reasonably-supported CSS tools for automatic numbering of paragraphs.