Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-03-2007, 04:13 PM
yipguseng's Avatar
Lost Webmaster
 
Join Date: Jan 2007
Location: Petaling Jaya
Posts: 857
Rep Power: 42
yipguseng will become famous soon enough yipguseng will become famous soon enough
Send a message via MSN to yipguseng
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~
__________________
Boonage - Freedom is Everything
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-03-2007, 05:18 PM
robot's Avatar
Senior Webmaster
 
Join Date: Jul 2006
Location: My
Posts: 969
Rep Power: 48
robot will become famous soon enough
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="www.mysite.com" rel="nofollow">
in the above example, the rel="nofollow" will tell the SE spider not to value the target link (www.mysite.com) 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-03-2007, 06:07 PM
yipguseng's Avatar
Lost Webmaster
 
Join Date: Jan 2007
Location: Petaling Jaya
Posts: 857
Rep Power: 42
yipguseng will become famous soon enough yipguseng will become famous soon enough
Send a message via MSN to yipguseng
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.
__________________
Boonage - Freedom is Everything
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-05-2007, 04:26 AM
genzy's Avatar
Nowhere Webmaster
 
Join Date: Aug 2006
Location: Malaysia
Posts: 1,581
Rep Power: 59
genzy is on a distinguished road
rel-tag specification
http://microformats.org/wiki/rel-tag

Know your rel-tags
http://microformatique.com/?p=61

"rel" attribute frequently asked questions
http://microformats.org/wiki/rel-faq

Is rel = “nofollow” really as !important as that?
http://weblog.philringnalda.com/2005...ortant-as-that

JavaScript is used to dynamically define the rel tag's value.
http://www.java2s.com/Code/JavaScrip...es/rel.htmcode)

http://www.java2s.com/Code/JavaScrip...taxandNote.htm
Sets the relationship between element and its href attribute.
Syntax:
Code:
Read and write property.    
document.getElementById("elementID").rel = value
document.all.elementID.rel = value // IE only
LINK - Document Relationship
http://htmlhelp.com/reference/html40/head/link.html
Quote:
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="mailto:liam@htmlhelp.com" 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="index.fr.html" 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML & JavaScript marcoenie Website Design 8 15-02-2006 12:03 PM
html builder? fadlee Website Design 7 06-10-2004 06:10 PM
Teknologi HTML pudina Webmaster Tools 8 24-09-2004 04:57 PM
Embed PHP into HTML.. HELP... wooncc Website Programming 8 24-09-2003 03:24 PM
HTML Editor supra Other Webmaster-related Services and Promotion 2 26-05-2003 12:10 AM



All times are GMT +8. The time now is 06:48 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60