...

View Full Version : Semantically correct markup for album title?



carrythebanner
08-01-2007, 10:09 PM
Hello everyone,

As evinced by my number of posts, I'm new here. Of course, few people probably come a-knockin' just to help and I'm no different -- I have some questions that perhaps have answers here. But though most of my web knowledge is of the homebrewed variety, I feel like I do have some understanding of the topics at hand and hopefully I can contribute here as well, at least in time.

That said, here goes question #1 ...

I'm working on a website for a band and I'm looking for the most semantically correct way to markup an album title. I know some people use <cite> for book titles, but even that seems odd in a conversational context, e.g., <q>One of my favorite books is <cite>On the Beach</cite>.</q> Given that, using <cite> for album titles seems even stranger, though I'd also argue that it's not totally incorrect.

Or do albums really need semantic meaning -- would it actually be appropriate just to use <i> because italicizing book titles and such is just a visual convention, and thus no special meaning should be attached to it? On the other hand, <span class="album-title"> is generic, but would it be best because it's generic and thus less wrong than misappropriating some other tag? Is it completely debatable and thus I should just give up, pick a method, and be consistent?

Given the number of music oriented pages out there on the web, I'm sort of surprised that my searches for any sort of discussion on this have come up empty-handed. Any feedback is appreciated. Thanks.

harbingerOTV
08-01-2007, 11:16 PM
wow, uh... I have no answer.

I did find this though:

http://tjameswhite.com/blog/archives/2005/07/semantic-markup-microformats/

Looks you two were on the same wave length. Looking at the the date of that entry, I guess he didn't an answer either. good luck.

ahallicks
08-02-2007, 09:18 AM
<q> is not recognised as a tag in IE I believe, so there wouldn't be much point in doing that. And <i> is deprecated in HTML 4.01 so it wouldn't be a good idea to use that.

Take a look at this (http://brainstormsandraves.com/articles/semantics/structure/) which may give you some ideas about the semantics of HTML and how and where to use them. Also contains some good details about blockquote and cite, which sound good for what you are wanting to do.

I think the reason that you won't have found many discussions about this is because semantic code is not very abundant on the web at the moment, and the likeliest place to find albums are the least likely to adhere to web standards and semantics. It's the business focus, over the desire for a semantic site.

I would also go on to say that it doesn't matter overly much which method you use because there is no tag out there that applies specifically to an album, whereas there is one for a paragraph, or a heading. Technically, if it is a title on the page then maybe a heading should be used? Especially if that album title goes on to a description. If not, you could simply use some form of emphasis such as <strong> to point out the titles over the rest of the page.

carrythebanner
08-03-2007, 03:06 PM
Thanks for the feedback. Knowing there is no definitive answer is a good enough answer for me.

(And thanks for the aside on the <q> element -- I thought it was well-supported, but someone's always got to ruin the party... )

carrythebanner
08-03-2007, 05:33 PM
For whatever it's worth, I came across this in an HTML5 draft:

http://www.w3.org/html/wg/html5/#the-cite

Yes, it's still a draft, but this seems to echo my earlier comment about <cite> not seeming appropriate for conversational references to a book/album/etc.

I guess a classed span will do for now.

Arbitrator
08-04-2007, 07:58 AM
I'm working on a website for a band and I'm looking for the most semantically correct way to markup an album title. I know some people use <cite> for book titles, but even that seems odd in a conversational context, e.g., <q>One of my favorite books is <cite>On the Beach</cite>.</q> Given that, using <cite> for album titles seems even stranger, though I'd also argue that it's not totally incorrect.

Or do albums really need semantic meaning -- would it actually be appropriate just to use <i> because italicizing book titles and such is just a visual convention, and thus no special meaning should be attached to it? On the other hand, <span class="album-title"> is generic, but would it be best because it's generic and thus less wrong than misappropriating some other tag? Is it completely debatable and thus I should just give up, pick a method, and be consistent?The HTML 4.01 spec demonstrates [1] that you can even mark the names of people with the cite element, so I donít see how it would be strange to mark up an album title with it. It would probably be the most correct element too IMO. If youíre concerned about the appearance, that can easily be restored by using CSS (e.g., font-style: normal to remove italicization).

The semantically neutral elements are used when thereís no better choice. If you would disagree that cite should be used for purpose, then use span. I would disagree with using i since it associates presentation with the element that requires editing the HTML to change (e.g., so if you start with italics and later want small caps, you end up having to alter the HTML and CSS).


http://www.w3.org/TR/html401/struct/text.html#edef-CITE



For whatever it's worth, I came across this in an HTML5 draft:

http://www.w3.org/html/wg/html5/#the-cite

Yes, it's still a draft, but this seems to echo my earlier comment about <cite> not seeming appropriate for conversational references to a book/album/etc. Yes, itís still a draft; the spec is not due for completion until 2010 and so may change significantly between now and then. Note that the HTML 5 spec has narrowed and redefined the semantics of certain elements, so it shouldnít be relied for determining HTML 4.01 semantics. For example, according to the current draft, i and small now have semantic meaning when they had none before; elements like strong, p, and address have a different semantic meaning than before; and elements like dt and dd can now have two semantic meanings simultaneously.

harbingerOTV
08-05-2007, 03:17 AM
I was thinkng a lot of this might have to used according to how your presenting the title. Since it's for a band site, are you listing info as a discography or just putting the name in a paragraph?

If listed like a disc. like:

Title
year
tracks
etc

then would it not be sound to build it in a DL? I know you can put block level elements in a DL but Im not sure about this...Can you out H6's in a DT?

something like:



<dl>
<dt><h6>Album Title</h6></dt>
<dd>year: </dd>
<dd>tracks
<ul>
<li>blah</li>
<li>blah</li>
<li>blah</li>
</ul>
</dd>
</dl>


would seem to justify the use and purpose

Arbitrator
08-05-2007, 03:58 AM
I know you can put block level elements in a DL but Im not sure about this...Can you out H6's in a DT?Only dt and dd are allowed in dl. dt is limited to inline content while dd may have both block and inline content. Thus, your code example is invalid.


then would it not be sound to build it in a DL?It might be, but not in the way that you proposed. There are several methods though.

Definition List with Header
There are at least two variations that I can think of for this. This works since the dt is (arguably) assumed to be a header. The track names could (again, arguably) be marked with cite elements, but I wonít, for brevity.

<h6><cite>album</cite></h6>
<dl>
<dt>year</dt>
<dd>2007</dd>
<dt>tracks/dt>
<dd>
<ol>
<li>Track 1</li>
<li>Track 2</li>
</ol>
</dd>
</dl>

This is one of the variations; itís closer to what you had, but looks weird.

<dl>
<dt><cite>album</cite></dt>
<dd>
<h6>year</h6>
<div>2007</div>
</dd>
<dd>
<h6>tracks</h6>
<ol>
<li>Track 1</li>
<li>Track 2</li>
</ol>
</dd>
</dl>

Another variation that looks better, I suppose.

<dl>
<dt><cite>album</cite></dt>
<dd>
<dl>
<dt>year</dt>
<dd>2007</dd>
</dl>
</dd>
<dd>
<dl>
<dt>tracks</dt>
<dd>
<ol>
<li>Track 1</li>
<li>Track 2</li>
</ol>
</dd>
</dl>
</dd>
</dl>

Table
This works since the caption is (arguably) assumed to be a header. Personally, I like this method best.

<table>
<caption><cite>album</cite></caption>
<tbody>
<tr>
<th scope="row">year</th>
<td>2007</td>
</tr>
<tr>
<th scope="row">tracks</th>
<td>
<ol>
<li>Track 1</li>
<li>Track 2</li>
</ol>
</td>
</tr>
</tbody>
</table>

Hierarchy of Header Elements
(Yes, I know that thereís no h7 element. This highlights a problem with numbered header elements.)

<h6><cite>album</cite></h6>
<h7>year</h7>
<div>2007</div>
<h7>tracks/h7>
<ol>
<li>Track 1</li>
<li>Track 2</li>
</ol>

harbingerOTV
08-05-2007, 08:03 AM
okay I see where you're going with this. so if we take an instance that we want to display an album, aertist and tracks in a listing sholud we just not keep it real simple? something like:



<dl>
<dt><b>Helmet</b></dt>
<dd>Aftertaste</dd>
<dd>&copy; 1997</dd>
<dd><b>Members:</b>
<ul>
<li>Paige Hamilton: Guitar/Vocals</li>
<li>Chris Traynor: Guitar</li>
<li>John Stanier: Drums</li>
<li>Henrry Bogdan: Bass</li>
</ul>
</dd>
</dl>


of course this is assuming that this is the way the information is to be presented.

carrythebanner
08-05-2007, 05:06 PM
The HTML 4.01 spec demonstrates [1] that you can even mark the names of people with the cite element, so I don’t see how it would be strange to mark up an album title with it. It would probably be the most correct element too IMO.
I originally felt that way, too, but just mentioning it conversationally doesn't seem like it's citing anything, e.g., "After Album X, they started working on Album Y." In that example, it doesn't seem like those are being cited.


If you’re concerned about the appearance, that can easily be restored by using CSS (e.g., font-style: normal to remove italicization).

I'm not worried about the presentation -- I know I can always change that with CSS. I'm just looking for something that provides some sort of indication that you're dealing with something that's not just another string of text.


The semantically neutral elements are used when there’s no better choice. If you would disagree that cite should be used for purpose, then use span. I would disagree with using i since it associates presentation with the element that requires editing the HTML to change (e.g., so if you start with italics and later want small caps, you end up having to alter the HTML and CSS).

It looks like this is where I'm going with it. I don't see <cite> as being exactly incorrect, but at the same time I think a semantically neutral <span> is less incorrect.

The main downside to using <span> is that when CSS is disabled/unsupported, the album title won't appear different in any way. So, is it better to have debatable semantics that degrade better, or less ambiguous but generic semantics that don't degrade as well? I'm still sort of up in the air, but for now I'm going with <span>s. Luckily, it's a small site that I don't foresee expanding any time soon, so should my mind change a find & replace will be relatively painless.



http://www.w3.org/TR/html401/struct/text.html#edef-CITE


Yes, it’s still a draft; the spec is not due for completion until 2010 and so may change significantly between now and then. Note that the HTML 5 spec has narrowed and redefined the semantics of certain elements, so it shouldn’t be relied for determining HTML 4.01 semantics. For example, according to the current draft, i and small now have semantic meaning when they had none before; elements like strong, p, and address have a different semantic meaning than before; and elements like dt and dd can now have two semantic meanings simultaneously.
The main reason I mentioned this draft was that it was one of the few places I've seen any discussion on the semantics of book titles & company. Even if it's not law now (or even if it never will be), it shows that there are at least some people out there who think that <cite> doesn't always make sense when marking up book titles, etc.

carrythebanner
08-05-2007, 05:16 PM
I was thinkng a lot of this might have to used according to how your presenting the title. Since it's for a band site, are you listing info as a discography or just putting the name in a paragraph?

I use album titles in all sorts of contexts -- headers, lists, in paragraphs ... pretty much everywhere. So while the semantics of the particular element (header or whatever) may help, I can't rely on it as the sole solution.

Thanks for all the feedback on the examples of the discography markup, though -- I'll file these for later.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum