0

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 ?

George Stocker
  • 57,289
  • 29
  • 176
  • 237
Guillaume
  • 18,494
  • 8
  • 53
  • 74

3 Answers3

2

Perhaps something like microformats will help?

Andrew Hare
  • 344,730
  • 71
  • 640
  • 635
1

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
  • 91,574
  • 70
  • 187
  • 238
  • I think title AND rel would be advantageous – annakata Jan 20 '09 at 14:26
  • 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 Jan 20 '09 at 15:09
1

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

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306