<link> (deprecated)

<link> (new version)

Expresses a relationship between an Atom entity and another resource.


<!ATTLIST link
    href (#PCDATA) #REQUIRED
    type (#PCDATA)
    title CDATA>

(eg <link rel="alternate" href="" [type="text/html"] [title="This entry's webpage"']>)



The LinkElement is used to express a relationship between a resource identified in an Atom feed and another "external" resource. The Atom resource is normally that associated with the parent of the link element (the link element may also be used to associate a schema name with a namespace, see below). The other resource is identified in the href attribute of the link element. The rel attribute defines the relationship between the two resources.

Relationship Values

The meaning of the rel attribute is determined in one of two ways. For terms defined in the Atom specification, the term may be used directly in the attribute, e.g.

   <link rel="inResponseTo"       type="application/x.atom+xml"       href="" />

The core terms are described at LinkTagMeaning For terms defined outside Atom, additional namespace-based qualification must be used.

Explicit Namespace

This method of defining the relationship uses a technique derived from that described in RFC 2731 (Encoding Dublin Core Metadata in HTML) . First an external schema is identified and its namespace identified with a schema name. This only needs to be done once per feed:



Subsequently the schema may be referred to in individual link entries:



(The # suffixed to the image.jpg url prevents this wiki from automagically displaying the image inline)

Implicit Namespace (Atom Core)

Much of the time the relationship schema used will be that defined in the Atom specification. To simplify the use of this a shorthand can be used. If there is no schema explicitly associated with the content of a rel attribute (using the method described above) then the value of the rel attribute is taken to refer to a term in the Atom namespace.

So this:

<feed> ...



is equivalent to, and will be used in preference to:




The core terms are described at LinkTagMeaning