Question

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 ?

Was it helpful?

Solution

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

OTHER TIPS

Perhaps something like microformats will help?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top