tags:

views:

71

answers:

3

I'd like to express in an HTML document what kind of document is pointed by an anchor tag (<a>). For example, is it a list of dates, or a list of people, etc... All referenced documents will be Atom feeds, but the links will be displayed differently based on what the feed contains.

I see 2 options :

  1. using the "rel" attribute : this attribute is supposed to contains the relation between the current document and the referenced document. I don't think this is an optimal solution as this attribute is supposed to define the relation and not really the content. The referenced document will be a list of dates for all documents referencing it.

  2. using the "type" attribute : this attribute is supposed to contains the content type of the referenced document. This solution seems closer to what I try to achieve, but this attribute should contains a content type and not a more generic description of the link.

Which solution would you recommend ? Do you see a cleaner way to achieve the same result ?

+2  A: 

Perhaps something like microformats will help?

Andrew Hare
Exactly, but which one ?
Guillaume
+1  A: 

title attribute on a link allows you to give the link a title which is displayed when it's hovered.

That might be what you want.

Allain Lalonde
I think title AND rel would be advantageous
annakata
Actually, the HTML will be parsed and modified on the fly to include the content of the feed instead of the anchor. We really want something more precise than a title.
Guillaume
+1  A: 

Use the class attribute, since your intent is make them appear different this would seem to be the best choice.

AnthonyWJones
This is **SO** obvious that I didnt event think about it. It might be the right answer to my problem !
Guillaume