The use of link in HTML

Source: Internet
Author: User

The use of link and what tags can be used behind <link

Overview
Link tag, which is used when declaring an external resource (such as CSS) in a document
The link tag appears separately
Property
HREF--Specifies the address URI of the resource (CSS file) to be loaded
Media-Medium type
REL--Specifies the link type, which is the relationship between object and link target, optional value, link can also be used shortcut icon, etc.
Rev--Specify link type
Type--Specifies the MIME type of the attached document, and the mime of the CSS is type/css, generally using type= "Text/css"

Rel Property
The rel attribute in the link tag defines the relationship of the document to the link.
The Rel attribute usually appears in the A,link tag
Property value
Alternate--Define the alternate occurrence of the link
Stylesheet--Define an externally loaded style sheet
Start-Notifies the search engine of the beginning of the document
Next-Record the next page of the document. (The browser can load this page in advance)
Prev--Records the previous page of the document. (defines the browser's back key)
Contents
Index--The indexing of the current document
Glossary--Vocabulary
Copyright--Copyrights of the current document
Chapter--chapter of the current document
Section-As part of a document
Subsection-as a small part of the document
Appendix--Define additional information for the document
Help--Link information
Bookmark--Bookmarks

Rev Property
The Rev attribute in the link tag, which defines the relationship between the document and the link
Rev is similar to rel and belongs to the retention tag

Alternate Property value
Alternate is a value of linktypes that Web designers can use to design alternate links
Alternate property values typically appear in the Rel,rev property

Example
Define two different styles that users can choose from a browser (ie does not support this property)
<link rel= "stylesheet" type= "Text/css" title= "Blue" href= "Dreamdublue.css"/>
<link rel= "Alternate stylesheet" type= "Text/css" title= "Red" href= "Dreamdured.css"/>
The contents of http://www.dreamdu.com/can be read by http://www.dreamdu.com/feed/
<link rel= "Alternate" type= "Application/rss+xml" href= "http://www.dreamdu.com/feed/"/>
Example of HTML alternate case switch style

Start Next Prev Property value
Start Next prev, all belong to LinkTypes, this value can usually prompt the browser to start the article, the next article, the URL of the previous article
The start next Prev property value usually appears in the Rel,rev property.
Example
<link rel= "Start" type= "text/html" href= "http://www.dreamdu.com/xhtml/"/>
<link rel= "prev" type= "text/html" href= "http://www.dreamdu.com/xhtml/alternate/"/>
<link rel= "Next" type= "text/html" href= "http://www.dreamdu.com/xhtml/attribute_rel/"/>
HTML Start Next Prev Example
Next-Record the next page of the document. (The browser can load this page in advance)
Prev--Records the previous page of the document. (defines the browser's back key)
Start-Notifies the search engine of the beginning of the document

The use of link in HTML

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.