Re: Subheadings desired in XHTML 2.0

John Lewis wrote:
> <h><cite>The Lord of the Rings: The Two Towers</cite></h>

Here you are not differentiating between title and subtitle in
the markup; instead, you are inserting formatting in the form
of a colon. If the title and subtitle were marked up correctly,
I would be able to have the equivalent of

title    { font-weight: bold; }
subtitle { font-style: italic;}

since I can then address each part specifically.

The first example you gave:

 > <h><cite>The Lord of the Rings <line>The Two Towers</line></cite></h>

is much better because if I assume that all <line>s in <h>s enclose
subtitles, I know which part is a title and which part is a subtitle.
I can style it as above, or do this:

h { font-size: x-large; }
h line { display: block; font-size: large; font-style: italic; }

or this:

h { font-size: x-large; }
h line { display: inline; font-size: large; }
h line:before { content: ': '; }

The problem with having the main text as 1st-level text and
the subtitle as a child's text is that the last CSS snippet
would result in an extra space before the colon.

(If this is the title of the ensuing text, btw, then it shouldn't
  be <cite>ed. If it's not, then as a citation it probably shouldn't
  be split into title and subtitle lines; the subtitle in this case
  isn't the subtitle of the section.)


Received on Wednesday, 13 November 2002 17:47:16 UTC