This site is no longer updated but kept as it still get lots of traffic. You can find more updated information about me at jenswedin.com.


Todays quiz – rel attribute

I would like to use the rel attribute for links that are related to a document. Would you use "related" as the value for that or would you use something else?

6 comments

  1. There’s no “related” option in the link types specified in (x)HTML (http://www.w3.org/TR/html401/types.html#type-links).

    I think none of the above link types suites your dilemma, I would skip the rel-attribute and maybe go for a nice description in the title-attribute instead.

    OT: and there’s no “no-follow” option in the linktypes either.

    Cheers

  2. I looked at that page. So you´re saying that rel values are invalid except the one you you´re linking to?

  3. I would say that, take a look at the optional attributes on http://www.w3schools.com/tags/tag_a.asp

    And the WHATWG is more specific in that area:

    The type of link indicated (the relationship) is given by the value of the rel attribute, which must be present, and must have a value that is an unordered set of space-separated tokens. The allowed values and their meanings are defined in a later section. If the rel attribute is absent, or if the value used is not allowed according to the definitions in this specification, then the element does not define a link.

    http://www.whatwg.org/specs/web-apps/current-work/#rel

    Cheers

  4. After a discussion with Emil Stenström ( http://www.friendlybit.com ).
    I came to the conclusion that the relation between documents should be defined with the rel attribute using the link-types as values, and if a custom link-type is used then a profile to cite the conventions should be used in the head element.

    http://www.w3.org/TR/html4/struct/links.html#idx-link-2
    http://www.w3.org/TR/html4/types.html#type-links
    http://www.w3.org/TR/html4/struct/global.html#adef-profile

    Cheers.

  5. Peter Vigren

    icaaq, Your link to the specification of HTML 4.01 that say:
    “Authors may wish to define additional link types not described in this specification. If they do so, they should use a profile to cite the conventions used to define the link types. Please see the profile attribute of the HEAD element for more details.”
    It is a bit harder to find information for XHTML for me though… But if the rel-discussion is for this particular site, then I would guess XHTML Transitional probably works the same way. Besides, you are already using the XFN profile…
    But the question itself is tricky… If I would look only on the predefined values, it’s quite hard to find a sufficient value. I thought maybe “Appendix” would work if you either reference text from that page or something like that. But I really don’t know. It feels like those predefined values only handle links on and to _your_ site and not links to others. So maybe it’s better to reference the “relatedness” in text or a list of links related to the page.

  6. Peter Vigren

    Ah, I wrote my message in response to the earlier posts of icaaq; now that it has been posted I see he already has brought up what I responded to his messages (i.e. the use of profiles etc). :-)

Leave a comment