link

Relationship values can be used in principle:

      a) for document specific toolbars/menus when used
         with the link element in document head e.g.
           start, contents, previous, next, index, end, help
      b) to link to a separate style sheet (rel="stylesheet")
      c) to make a link to a script (rel="script")
      d) by stylesheets to control how collections of
         html nodes are rendered into printed documents
      e) to make a link to a printable version of this document
         e.g. a PostScript or PDF version (rel="alternate" media="print")

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
charset Charset optional
class xs:NMTOKENS optional
dir restriction of xs:token optional
href URI optional
hreflang LanguageCode optional
id xs:ID optional
lang LanguageCode optional
media MediaDesc optional
onclick Script optional
ondblclick Script optional
onkeydown Script optional
onkeypress Script optional
onkeyup Script optional
onmousedown Script optional
onmousemove Script optional
onmouseout Script optional
onmouseover Script optional
onmouseup Script optional
rel LinkTypes optional
rev LinkTypes optional
style StyleSheet optional
title Text optional
type ContentType optional
xml:lang union of(xs:language, restriction of xs:string) optional
Attempting to install the relevant ISO 2- and 3-letter
         codes as the enumerated possible values is probably never
         going to be a realistic possibility.  See
         RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
         at http://www.iana.org/assignments/lang-tag-apps.htm for
         further information.

         The union allows for the 'un-declaration' of xml:lang with
         the empty string.

Used By

Element Group head.misc

Source

<xs:element name="link">
  <xs:annotation>
    <xs:documentation>Relationship values can be used in principle: a) for document specific toolbars/menus when used with the link element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel="stylesheet") c) to make a link to a script (rel="script") d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a PostScript or PDF version (rel="alternate" media="print")</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:attributeGroup ref="attrs"/>
    <xs:attribute name="charset" type="Charset"/>
    <xs:attribute name="href" type="URI"/>
    <xs:attribute name="hreflang" type="LanguageCode"/>
    <xs:attribute name="type" type="ContentType"/>
    <xs:attribute name="rel" type="LinkTypes"/>
    <xs:attribute name="rev" type="LinkTypes"/>
    <xs:attribute name="media" type="MediaDesc"/>
  </xs:complexType>
</xs:element>

Sample