Click here to get back home

Subtitles and bylines

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Subtitles and bylines David Trimboli 09-09-2007
Posted by David Trimboli on September 9, 2007, 4:56 pm
Please log in for more thread options


What would be the best way to represent subtitles and bylines in HTML
4.01? For instance:

TITLE: Subtitles and Bylines in HTML
SUBTITLE: Being an Examination of Semantic Best Practices in the
Creation of Web Pages
BYLINE: by David Trimboli

The title would most likely be an H1. What about the others? They're not
really paragraphs, are they?

David
Stardate 7690.2


Posted by Stefan Ram on September 9, 2007, 5:22 pm
Please log in for more thread options


>What would be the best way to represent
>subtitles and bylines in HTML 4.01?

The answer might depend on whether you want to
represent a subtitle

- for the whole current HTML page

- for a section of an HTML page

- for a description of another document
with that subtitle (as in a »references«
section)

- for the use of a subtitle of another
document within a paragraph of the
current document

In any case, the answer is difficult, because HTML
does not directly support the notion of a subtitle.
So one needs to invent a workaround.
But the workaround might depend on the context.


Posted by Jukka K. Korpela on September 9, 2007, 5:40 pm
Please log in for more thread options


Scripsit David Trimboli:

> What would be the best way to represent subtitles and bylines in HTML
> 4.01?

All ways are more or less debatable, but some of them make much more sense
than others.

> TITLE: Subtitles and Bylines in HTML
> SUBTITLE: Being an Examination of Semantic Best Practices in the
> Creation of Web Pages
> BYLINE: by David Trimboli
>
> The title would most likely be an H1. What about the others? They're
> not really paragraphs, are they?

No, they are not paragraphs. You could make them <div> elements, probably
with class attributes. You could make the byline an <address> element,
especially if you add some contact info other than just the name, like
e-mail address.

Some people would make the subtitle an <h2> element, but I think it is more
reasonable to treat it as part of <h1>:

<h1>Subtitles and Bylines in HTML<br>
<small>Being an Examination of Semantic Best Practices in the
Creation of Web Pages</small></h1>

Someone might argue that <small> is physical not logical markup, and in
principle that's true. The alternative is to use <span>, which means nothing
(i.e., is semantically empty) and does not affect rendering without CSS.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Posted by André Gillibert on September 10, 2007, 5:53 am
Please log in for more thread options


Jukka K. Korpela wrote:

> Scripsit David Trimboli:
>> The title would most likely be an H1. What about the others? They're
>> not really paragraphs, are they?
>
> No, they are not paragraphs.

Right.

> You could make them <div> elements, probably with class attributes.

Yes, that's what I would have done, back in time, before I tried to write
a non-CSS HTML processor and discovered that DIV was so semantically empty
that every DIV element was a nightmare to interpret in a document.
Sometimes ignoring DIV elements is the right thing to do. But sometimes
DIV elements should be rendered as separate sections...

> You could make the byline an <address> element, especially if you add
> some contact info other than just the name, like e-mail address.

Yep, this is ADDRESS is supposed to give contact info for the author of
the document or a major part of the document.


> Some people would make the subtitle an <h2> element, but I think it is
> more reasonable to treat it as part of <h1>:
>

I agree.


--

Posted by Jonathan N. Little on September 10, 2007, 10:27 am
Please log in for more thread options


Jukka K. Korpela wrote:
> Scripsit David Trimboli:
>
>> What would be the best way to represent subtitles and bylines in HTML
>> 4.01?
>
> All ways are more or less debatable, but some of them make much more
> sense than others.
>
>> TITLE: Subtitles and Bylines in HTML
>> SUBTITLE: Being an Examination of Semantic Best Practices in the
>> Creation of Web Pages
>> BYLINE: by David Trimboli
>>
>> The title would most likely be an H1. What about the others? They're
>> not really paragraphs, are they?
>
> No, they are not paragraphs. You could make them <div> elements,
> probably with class attributes. You could make the byline an <address>
> element, especially if you add some contact info other than just the
> name, like e-mail address.
>
> Some people would make the subtitle an <h2> element, but I think it is
> more reasonable to treat it as part of <h1>:
>
> <h1>Subtitles and Bylines in HTML<br>
> <small>Being an Examination of Semantic Best Practices in the
> Creation of Web Pages</small></h1>
>
> Someone might argue that <small> is physical not logical markup, and in
> principle that's true. The alternative is to use <span>, which means
> nothing (i.e., is semantically empty) and does not affect rendering
> without CSS.
>

I would be more inclined to use SPAN, your could give the SPAN a class
like 'subtitle' but not needed you could just use the association that a
SPAN within the H1 is a sub-heading and uses modifying style. A little
cleaner on the markup.

h1 span {
display: block; margin: 0 .25em; font-size: .8em;
}
.byline {
padding-right: .5em; border-top: 1px solid #555; text-align: right;
}


<h1>
Subtitles and Bylines in HTML
<span>
Being an Examination of Semantic Best Practices in the Creation of
Web Pages
</span>
</h1>
<div class="byline">by David Trimboli</div>
<p>The article ...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap