rel property
Sets or retrieves the relationship between the object and the destination of the link.
![]() |
Syntax
HRESULT value = object.put_rel( v);HRESULT value = object.get_rel(* p);
Property values
Type: BSTR
one or more of the space delimited values in the list of Possible Values.-
Substitute version of the file that contains the link.
-
Page that is an appendix for the set of pages.
-
Bookmark. Internet Explorer 8. The anchor is an alternate navigation source for a Web Slice.
-
Page that is a chapter for a set of pages.
-
Table of contents document.
-
Copyright notice for the current page.
-
IE11. Identifies a DNS query to resolve the background, so that requests can occur more quickly.
Example:
<link rel="dns-prefetch" href="http://example.com/"/>
-
Internet Explorer 8. The anchor is an alternate display source for a Web Slice.
-
Internet Explorer 8. The anchor is an alternate update source for a Web Slice.
-
Glossary for the current page.
-
Help document.
-
Index document for the current page.
-
Next document in a sequence.
-
Path to the CDF file to be used for an offline favorite.
-
IE11. Identifies a resource file, such as an image or a CSS stylesheet, to be loaded into the cache.
Example:
<link rel="prefetch" href="http://example.com/style.css" />
-
IE11. Identifies a webpage to load in the background, in case the user wants to load it next.
Example:
<link rel="preload" href="http://example.com/nextpage.html" />
-
Previous document in a sequence.
-
Internet Explorer 7 and later. The link refers to an OpenSearch Description file. (See Search Provider Extensibility in Internet Explorer for more information.) The
Searchtype is not defined by the HTML 4.01 specification. For strict validation, includehttp://a9.com/-/spec/opensearch/1.1/in the IHTMLHeadElement2::profile attribute of the head element. -
Page that is a section for a set of pages.
-
Path to an icon file to be used for the favorite or link. See How to Add a Shortcut Icon to a Web Page.
-
First document of a set.
-
Style sheet.
-
Page that is a subsection for a set of pages.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
- HTML 4.01 Specification, Section 12.2
Remarks
If no values are indicated, the IHTMLLinkElement::rel property's default relationship is an empty string.
The Offline, Search, Shortcut Icon, and Stylesheet values apply only to the link object.
The IHTMLLinkElement::rel property is similar to the IHTMLLinkElement::rev property, but the semantics of these two properties' link types are in the reverse direction. For example, a link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". An anchor can have both IHTMLLinkElement::rel and IHTMLLinkElement::rev properties.
Internet Explorer 8 and later. In IE8 Standards mode, the IHTMLLinkElement::rel content attribute locates the Alternate token regardless of its position in a space-delimited list of tokens. For example, IHTMLLinkElement::rel will locate Alternate whether it is parsed as IHTMLLinkElement::rel or IHTMLLinkElement::rel. For more information on IE8 mode, see Defining Document Compatibility.
The Offline value is available in Microsoft Internet Explorer 5 and later. For more information about CDF files and offline favorites, see Enhancing Offline Favorites. CDF is obsolete as of Internet Explorer 7.
See also
- Reference
- IHTMLLinkElement::rev
- Other Resources
- Subscribing to Content with Web Slices
