Типы ссылок
В HTML следующие типы ссылок показывают отношения между двумя документами, в одном из которых, ссылка ведёт к другому, используя элементы <a>
, <area>
или <link>
.
Тип ссылки | Описание | Разрешён в этих элементах | Не разрешён в |
---|---|---|---|
alternate |
|
<a> , <area> ,
<link>
|
Нет |
archives |
Defines a hyperlink to a document that contains an archive link to this
one. For example, a blog entry could link to a monthly index page this
way. Note: Although recognized, the singular archive is incorrect and must be avoided.
|
<a> , <area> ,
<link>
|
Нет |
author |
Defines a hyperlink to a page describing the author or providing a way
to contact the author. Note: This may be a mailto: hyperlink, but this is not recommended on public
pages as robot harvesters will quickly lead to a lot of spam sent to the
address. In that case, it is better to lead to a page containing a
contact form.Although recognized, the rev attribute on
<a> , <area>
or<link> elements with a link type of
made is incorrect and should be replaced by the
rel attribute with this link type.
|
<a> , <area> ,
<link>
|
Нет |
bookmark |
Indicates that the hyperlink is a
permalink for the nearest ancestor
<article> element. If none, it is a permalink
for the
section
that the element is most closely associated to.This allows for bookmarking a single article in a page containing multiple articles, such as on a monthly summary blog page, or a blog aggregator. |
<a> , <area> |
<link> |
dns-prefetch
Экспериментальная возможность
|
Hints to the browser that a resources is needed allowing the browser to do a DNS lookup and protocol handshaking before a user clicks the link. | <link> |
<a> , <area> |
external |
Indicates that the hyperlink leads to a resource outside the site of the current page; that is, following the link will make the user leave the site. | <a> , <area> |
<link> |
first |
Indicates that the hyperlink leads to the first resource of the
sequence the current page is in. Note: Other link types related to linking resources in the same sequence are last , prev ,
next .Although recognized, the synonyms begin and start are incorrect and must be
avoided.
|
<a> , <area> ,
<link>
|
Нет |
help |
<a> , <area> ,
<link>
|
Нет | |
icon |
Defines a resource for representing the page in the user interface,
usually an icon (auditory or visual). The media ,
type and
sizes attributes allow the
browser to select the most appropriate icon for its context. If several
resources match, the browser will select the last one declared, in tree
order. As these attributes are merely hints, and the resources may be
inappropriate upon further inspection, the browser will then select
another one, if appropriate.Note: Apple's iOS does not use this link type, nor the sizes attribute, like others
mobile browsers do, to select a webpage icon for Web Clip or a start-up
placeholder. Instead it uses the non-standard
apple-touch-icon
and
apple-touch-startup-image
respectively.The shortcut link type is often
seen before icon , but this link type is non-conforming,
ignored and web authors must not use it anymore.
|
<link> |
<a> , <area> |
index |
Indicates that the page is part of a hierarchical structure and
that the hyperlink leads to the top level resource of that structure. If one or several up link types are also present, the number
of these up indicates the depth of the current page in the
hierarchy.
|
<a> , <area> ,
<link>
|
Нет |
last |
Indicates that the hyperlink leads to the last resource of the
sequence the current page is in. Note: Other link types related to linking resources in the same sequence are first , prev ,
next .Although recognized, the synonym end is incorrect and must be avoided.
|
<a> , <area> ,
<link>
|
Нет |
license |
Indicates that the hyperlink leads to a document describing the
licensing information. If not inside the
<head> element, the standard doesn't
distinguish between a hyperlink applying to a specific part of the
document or to the document as a whole. Only the data on the page can
indicate this.Note: Although recognized, the synonym copyright is incorrect and must be avoided.
|
<a> , <area> ,
<link>
|
Нет |
manifest |
Indicates that the linked file is a Web App Manifest. | <link> |
<a> , <area> |
next |
Indicates that the hyperlink leads to the next resource of the
sequence the current page is in. Note: Other link types related to linking resources in the same sequence are first , prev , last .
|
<a> , <area> ,
<link>
|
Нет |
nofollow |
Indicates that the linked document is not endorsed by the author of this one, for example if it has no control over it, if it is a bad example or if there is commercial relationship between the two (sold link). This link type may be used by some search engines that use popularity ranking techniques. | <a> , <area> |
<link> |
noopener |
Instructs the browser to open the link without granting the new browsing
context access to the document that opened it, by not setting the
Window.opener (en-US) property on the opened window.This is especially useful when opening untrusted links, in order to ensure they cannot tamper with the originating document, while still providing the Referer HTTP header (unless noreferrer is
used as well).
|
<a> , <area> |
<link> |
noreferrer |
Prevents the browser, when navigating to another page, to send this
page name, or any other value, as referrer via the
|
<a> , <area> |
<link> |
pingback |
Defines an external resource URI to call if one make a comment or a
citation about the webpage. The protocol used to make such a call is
defined in the
Pingback 1.0
specification. Note: if the X-Pingback: HTTP header is also present, it supersedes the
<link> element with this link type.
|
<link> |
<a> , <area> |
preconnect
Экспериментальная возможность
|
Provides a hint to the browser suggesting that it open a connection to the linked web site in advance, without disclosing any private information or downloading any content, so that when the link is followed the linked content can be fetched more quickly. | <link> |
<a> , <area> |
prefetch |
Suggests that the browser fetch the linked resource in advance, as it is
likely to be requested by the user. Starting with Firefox 44, the value
of the crossorigin attribute is
taken into consideration, making it possible to make anonymous
prefetches.Note: The Link Prefetch FAQ has details on which links can be prefetched and on alternative methods. |
<a> Не реализовано,<area>
Не реализовано,<link>
|
Нет |
preload |
Tells the browser to download a resource because this resource will be needed later during the current navigation. | <link> |
<a> , <area> |
prerender
Экспериментальная возможность
|
Suggests that the browser fetch the linked resource in advance, and that it also render the prefetched content offscreen so it can be quickly presented to the user once needed. | <link> |
<a> , <area> |
prev |
Indicates that the hyperlink leads to the preceding resource of
the sequence the current page is in. Note: You can also use the next keyword to specify a link to the
next page in the sequence.Although recognized, the synonym previous is incorrect and must be avoided.
|
<a> , <area> ,
<link>
|
Нет |
search |
Indicates that the hyperlink reference a document whose interface is
specially designing for searching in this document, or site, and its
resources. If the type
attribute is set to
application/opensearchdescription+xml the resource is an
OpenSearch plugin
that can be easily added to the interface of some browsers like Firefox
or Internet Explorer.
|
<a> , <area> ,
<link>
|
Нет |
stylesheet |
Defines an external resource to be used as a stylesheet. If the
type is not set, the browser should assume it is a
text/css stylesheet until further inspection.If used in combination with the alternate keyword, it defines
an
alternative style sheet; in that case the title
attribute must be present and not be the empty string.
|
<link> |
<a> , <area> |
sidebar
Non-standard
|
Indicates that the hyperlink leads to a resource that would be better
suited for a secondary browsing context, like a sidebar.
Browsers, that don't have such a context will ignore this keyword. While once part of the HTML specification, this has been removed from the spec and is only implemented by Firefox at this time. |
<a> , <area> ,
<link>
|
Нет |
tag |
Indicates that the hyperlink refers to a document describing a
tag that applies to this document. Note: This link type should not be set on links to a member of a tag cloud as these do not apply to a single document but to a set of pages. |
<a> , <area> |
<link> |
up |
Indicates that the page is part of a hierarchical structure and
that the hyperlink leads to the higher level resource of that
structure. The number of up link types indicates
the depth difference between the current page and the linked resource.
|
<a> , <area> ,
<link>
|
Нет |
Спецификации
Specification |
---|
HTML Standard # linkTypes |
Поддержка браузерами
html.elements.link.rel
BCD tables only load in the browser
html.elements.a.rel
BCD tables only load in the browser
html.elements.area.rel
BCD tables only load in the browser