JavaScript Reference/Javascript Properties/rel
"rel" Example
<source lang="javascript">
<html> <body> <a id="myLink" href="examples.css" target="_blank"> The style sheet attached to this document </a> <script language="JavaScript">
document.getElementById("myLink").rel = "stylesheet";
</script> </body> </html>
</source>
"rel" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <link> | +----------------+--------------------------------------------------------------+
</source>
"rel" Possible Values
<source lang="javascript">
Possible Values Alternate a substitute file Appendix an appendix page Bookmark, Chapter, a chapter page Contents the table of contents Copyright, Glossary, Help, Index the index page Next the next page Prev the previous page Section a page that is a section of a group of pages Shortcut Icon the href to an icon Start the first page Stylesheet, Subsection a subsection page
</source>
"rel" Syntax and Note
<source lang="javascript">
Note: Read and write property. Sets the relationship between element and its href attribute.
Syntax:
document.getElementById("elementID").rel = value document.all.elementID.rel = value // IE only
</source>