[whatwg] [web-apps] Titles in HTML (was: 2.7.8 The i element)

A way to mark up titles is something I've always wanted in HTML.  
Currently, <cite> is only appropriate for actual citations. I rarely cite  
books, movies, etc.; I'm usually just talking about them. <i> is worse.  
It's basically meaningless. The best I can do is <i class="movie"> or  
something, and even then it's only appropriate for titles that are  
italicized. Song names (and other minor works) are generally written in  
quotation marks, not italicized. <i class="song"> is awful.

Titles are common enough to belong in HTML. For some evidence, here is a  
non-comprehensive list of all the major and minor work types I could think  
of:

Major works (italicized in print)
1. books
2. movies
3. video games
4. newspapers
5. plays
6. long (book-length) poems
7. magazines
8. albums
9. radio/TV programs
[10. websites?]

Minor works (printed in quotation marks)
1. (magazine, newspaper) articles
2. short stories
3. poems
4. songs
5. book chapters
6. speeches
7. episodes of radio/TV programs

Everyone writes about these things. (And I don't think I'm exaggerating  
when I say everyone.)

Some ideas:

1. Two new elements, one for major works and one for minor works (these  
are bad element names, but I couldn't think of anything better)
	major example: <major class="book">The Great Gatsby</major>
	minor example: <minor class="song">Eleanor Rigby</minor>
Bad: needs two new elements and a specified list of class attribute values
Good: it's easy to add new types of works in the future: just add a class  
attribute value for it (e.g., video games are only a few decades old)

2. One new element, for any work, with some way to differentiate between  
types of works
	major example: <t class="book">The Great Gatsby</t>
	minor example: <t class="song">Eleanor Rigby</t>
[Titles are common, so having a short element name wouldn't be uncalled  
for. See <http://www.w3.org/People/Bos/DesignGuide/readability.html>]

Bad: needs a new element and a specified list of class attribute values
Good: extensible, only one new element

3. Reuse the cite element, with some way to differentiate between types of  
works
	major example: <cite class="book">The Great Gatsby</cite>
	minor example: <cite class="song">Eleanor Rigby</cite>

Bad: redefines an element
Good: doesn't need any new elements, extensible

4. Reuse the i element

Bad: I don't like this idea at all, especially for minor works, which  
aren't italicized.
Good: No new element...

I'm not particular about which element(s) we use as long as we get some  
way to mark up titles. It's too bad we can't use <title>, since it would  
be perfect. I like the idea of class attribute values with some (defined)  
meaning. Would there be ANY advantage to using a new attribute? I like  
class because authors are familiar with it and it's easily styled with CSS  
(in HTML). I'm also not sure if the class part should be optional. It  
probably should be, for lazy authors. I would prefer it be required.

If there is one element, the default style should be italic (AFAIK <cite>  
already is)
	t { font-style: italic; }
with more specific rules for songs and such. With HTML
	t.song, t.poem { font-style: normal; }
and so on. It's not the end of the world if someone leaves off the class  
attribute and song names are italicized. It would be "worse" for books to  
be in normal text. For the (rare) case of a title within a title, there  
would ideally be be something like
	t t { font-style: normal; }
so that the title within a title would be normal.

I strongly believe quotation marks (for songs, etc.) should be written by  
the author in the document, not added with CSS. <q> is messy and hard to  
use.

-- 
John Lewis

Received on Saturday, 16 April 2005 11:22:27 UTC