Results 1 to 4 of 4

Thread: rel in html

  1. #1
    Join Date
    Jan 2007
    Petaling Jaya
    Rep Power

    rel in html

    was already have this question in mind for quite sometime, does anybody know what actually does the "rel" do or work in <a> and probably in <link> as well? i just know is about relation, and there's also one attribute which is "rev", if i m not wrong should b the reverse relation. But what does it do actually, anybody? Thanks in advanced~

  2. #2
    Join Date
    Jul 2006
    Rep Power
    one thing I know about this is
    in the <a> tag, the rel is used to tell the Search Engine spider whether to accredit the target link or not.
    for example
    <a href="" rel="nofollow">
    in the above example, the rel="nofollow" will tell the SE spider not to value the target link ( thus will not give any point on its pagerank.

    if you look at the comments on most blogs, the link on each commentors name actually has this rel="nofollow" instruction.

    hope this is what u want

  3. #3
    Join Date
    Jan 2007
    Petaling Jaya
    Rep Power
    this i sort of knew it, thanks anyway robot but there should b some other use, such as the <link> for the css, and also i saw some of the javasciprt effect which uses this <rel> attributes to actually pass variables.

  4. #4
    Join Date
    Aug 2006
    Rep Power
    rel-tag specification

    Know your rel-tags

    "rel" attribute frequently asked questions

    Is rel = “nofollow” really as !important as that?

    JavaScript is used to dynamically define the rel tag's value.
    Sets the relationship between element and its href attribute.
    Read and write property.    
    document.getElementById("elementID").rel = value
    document.all.elementID.rel = value // IE only
    LINK - Document Relationship
    Syntax <LINK>
    Attribute Specifications

    * REL=LinkTypes (relationship to link)
    * REV=LinkTypes (relationship from link)
    * HREF=URI (hypertext reference)
    * TYPE=ContentType (content-type of link)
    * TARGET=FrameTarget (frame to render link in)
    * MEDIA=MediaDesc (media appropriate for link)
    * HREFLANG=LanguageCode (language of link)
    * CHARSET=Charset (character encoding of link)
    * common attributes

    Contents Empty
    Contained in HEAD

    The LINK element defines document relationships. Any number of LINK elements may be contained in the HEAD of a document. Many browsers lack support for LINK, so authors should not depend on the browser making the links available to the user.

    The REL and REV attributes define the nature of the relationship between the documents and the linked resource. REL defines a link relationship from the current document to the linked resource while REV defines a relationship in the opposite direction. For example,

    <LINK REL=Glossary HREF="foo.html">

    indicates that foo.html is a glossary for the current document while

    <LINK REV=Subsection HREF="bar.html">

    indicates that the current document is a subsection of bar.html. The value of the REL and REV attributes is a space-separated list of link types.

    Commonly used relationships include the next or previous document in a sequence, the starting page in a collection of documents, a document with copyright information, and information about the author. A document could define these relationships as follows:

    <LINK REL=Prev HREF="base.html" TITLE="BASE - Document Base URI">
    <LINK REL=Next HREF="meta.html" TITLE="META - Metadata">
    <LINK REL=Start HREF="../" TITLE="HTML 4 Reference">
    <LINK REL=Copyright HREF="/copyright.html" TITLE="Copyright Notice">
    <LINK REV=Made HREF="" TITLE="HTML 4 Reference Feedback">

    While the value of REL and REV is case-insensitive, the Lynx browser renders the relationship exactly as given by the author. Authors should therefore be consistent in their case, and may wish to capitalize the first letter while using lowercase for the rest.

    Authors can also use the LINK element to apply an external style sheet. REL=StyleSheet specifies a persistent or preferred style while REL="Alternate StyleSheet" defines an alternate style. A persistent style is one that is always applied when style sheets are enabled. The absence of the TITLE attribute indicates a persistent style.

    A preferred style is one that is automatically applied. The combination of REL=StyleSheet and a TITLE attribute specifies a preferred style. Authors cannot specify more than one preferred style.

    An alternate style is indicated by REL="Alternate StyleSheet". The user could choose to replace the preferred style sheet with an alternate one, though current browsers generally lack the ability to choose alternate styles.

    A single style may also be given through multiple style sheets:

    <LINK REL=StyleSheet HREF="basics.css" TITLE="Contemporary" TYPE="text/css">
    <LINK REL=StyleSheet HREF="tables.css" TITLE="Contemporary" TYPE="text/css">
    <LINK REL=StyleSheet HREF="forms.css" TITLE="Contemporary" TYPE="text/css">

    In this example, three style sheets are combined into one "Contemporary" style that is applied as a preferred style sheet. To combine multiple style sheets into a single style, each style sheet's LINK must use the same TITLE.

    LINK's MEDIA attribute specifies the media for which the linked resource is designed. With REL=StyleSheet, this allows authors to restrict a style sheet to certain output devices, such as printers or aural browsers. The attribute's value is a comma-separated list of media descriptors. The following media descriptors are defined in HTML 4 and are case-sensitive:

    * screen (the default), for non-paged computer screens;
    * tty, for fixed-pitch character grid displays (such as the display used by Lynx);
    * tv, for television-type devices with low resolution and limited scrollability;
    * projection, for projectors;
    * handheld, for handheld devices (characterized by a small display and limited bandwidth);
    * print, for output to a printer;
    * braille, for braille tactile feedback devices;
    * aural, for speech synthesizers;
    * all, for all devices.

    Netscape 4.x incorrectly ignores any style sheet linked with a MEDIA value other than screen. For example, MEDIA="screen, projection" will cause the style sheet to be ignored by Netscape 4.x, even if the presentation device is a computer screen. Netscape 4.x also ignores style sheets declared with MEDIA=all.

    The optional HREFLANG and CHARSET attributes of LINK give the language and character encoding, respectively, of the link. The language should be specified according to RFC 1766; examples include en for English, en-US for American English, and ja for Japanese. Examples of character encodings include ISO-8859-1, Shift_JIS, and UTF-8.

    The Alternate link relationship defines an alternate version of the document. Translations of a page can be identified by using REL=Alternate along with the HREFLANG attribute. Versions of the page tailored for specific media can be provided by combining REL=Alternate with the MEDIA attribute. Some examples follow:

    <LINK REL=Alternate HREF="" HREFLANG=fr LANG=fr TITLE="Version française">
    <LINK REL=Alternate HREF="index.ja.html" HREFLANG=ja CHARSET="Shift_JIS" TITLE="Japanese version">
    <LINK REL=Alternate HREF="/distribution/html40.pdf" TYPE="application/pdf" MEDIA=print TITLE="PDF version">

    Note that the LANG and DIR attributes apply to the text of the TITLE attribute, not to the content of the link.

    The TARGET attribute is used with frames to specify the frame in which the link should be rendered. If no frame with such a name exists, the link is rendered in a new window unless overridden by the user. Special frame names begin with an underscore:

    * _blank renders the link in a new, unnamed window
    * _self renders the link in the current frame (useful for overriding a BASE TARGET)
    * _parent renders the link in the immediate FRAMESET parent
    * _top renders the link in the full, unframed window

    In HTML 4, the TARGET attribute value is case-insensitive, so that _top and _TOP both have the same meaning. However, most browsers treat the TARGET attribute value as case-sensitive and do not recognize _TOP as having the special meaning of _top.
    Last edited by genzy; 06-05-2007 at 04:33 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PSD to HTML/CSS
    By therion in forum Advertise Your Services
    Replies: 0
    Last Post: 24-12-2008, 03:06 AM
  2. html
    By hafiza in forum Website Design
    Replies: 9
    Last Post: 23-04-2008, 11:17 AM
  3. .html dan .inc
    By redzanime in forum Website Design
    Replies: 1
    Last Post: 05-05-2007, 11:59 PM
  4. PHP into HTML
    By arthermax in forum Website Programming
    Replies: 4
    Last Post: 18-04-2007, 07:03 PM
  5. html builder?
    By fadlee in forum Website Design
    Replies: 7
    Last Post: 06-10-2004, 06:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37