Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Tipos de enlaces

Esta traducción está incompleta. Por favor, ayuda a traducir este artículo del inglés.

En HTML, los siguientes tipos de enlaces indican la relación entre dos documentos, de los cuales uno enlaza al otro usando un elemento <a> o bien <area>, o bien <link>.

Lista de tipos de link y su significado en HTML
Tipo de Link Descripción Allowed in these elements Not allowed in these elements
alternate
  • Si el elemento es <link> y el atributo  rel tambien contiene el tipo stylesheet, el enlace define una hoja de estilo alternativa; en ese caso el atributo title deberá estar presente y no ser una cadena vacia.
  • Si el atributo type es puesto a application/rss+xml o application/atom+xml, el enlace define un feed de distribución. El primero de ellos definido en la pagina es el tomado por default.
  • De otra forma, el enlace define una pagina alternativa, de uno de los siguientes tipos:
    • para otros medios, como un dispositivo portatil (si el atributo media esta indicado)
    • en otro lenguaje (si el atributo hreflang esta indicado),
    • en otro formato, como un PDF (si el atributo type esta indicado)
    • una combinacion de los anteriores.
<a>, <area>, <link> None.
archives Define un hipervínculo a un documento que contiene un enlace de archivo a este. Por ejemplo, la entrada de un blog podria enlazar a una página de indice mensual de esta forma.

Nota: Aunque se reconoce, el singular archive es incorrecto y debe ser evitado.
<a>, <area>, <link> None.
author Define un hipervinculo a una página describiendo el autor o proporcionando una forma de contactar al autor.

Note: Este puede ser un hipervinculo mailto:, pero esto no es recomendable en paginas públicas por que robots cosechadores podrian rapidamente llevar una gran cantidad de span a esa dirección. In that case, it is better to lead to a page containing a contact form.

Aunque reconocido, el atributo rev en elementos <a>, <area> o <link> con un enlace de tipo made es incorrecto y debiera ser reemplazado por el atributo rel con este tipo de enlace.
<a>, <area>, <link> None.
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>
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 synomyns begin and start are incorrect and must be avoided.
<a>, <area>, <link> None.
help
HTML5
  • If the element is <a> or <area>, it indicates that the hyperlink leads to a resource giving further help about the parent of the element, and its descendants.
  • If the element is <link> it indicates that the hyperlink leads to a resource giving further help about the page as a whole.
<a>, <area>, <link> None.
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> None.
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 synomyn end is incorrect and must be avoided.
<a>, <area>, <link> None.
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> None.
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> None.
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>
noreferrer

Prevents the browser, when navigating to another page, to send this page name, or any other value, as referrer via the Referer: HTTP header.
(In Firefox, before Firefox 37, this worked only in links found in pages. Links clicked in the UI, like "Open in a new tab" via the contextual menu, doesn't abide for this value)

<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, this header has precedence over the <link> element with this link type
<link> <a>, <area>
preconnect Hints the browser to open in advance the connection to the linked web site, without disclosing any private information. <link> <a>, <area>
prefetch Hints the browser to fetch in advance the linked resource, as it will likely be requested by the user.

Note: the Link Prefetch FAQ has details on which links can be prefetched and on alternative methods.
<a> No implementado,
<area> No implementado,
<link>
None.
preload Tells the browser to download a resource because this resource will be needed later during the current navigation. <link> <a>, <area>
prerender   <link> <a>, <area>
prev Indicates that the hyperlink leads to the preceding resource of the sequence the current page is in.

Note: other link types related to linking resources in the same sequence are first, last, next.

Although recognized, the synomyn previous is incorrect and must be avoided.
<a>, <area>, <link> None.
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> None.
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 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. <a>, <area>, <link> None.
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> None.
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> None.

Specifications

Specification Status Comment
Resource Hints
The definition of 'preconnect' in that specification.
Working Draft Added dns-prefetch, preconnect, and prerender values.
WHATWG HTML Living Standard
The definition of '<link>' in that specification.
Living Standard No change since last snapshot (WHATWG HTML Living Standard)
HTML5
The definition of '<link>' in that specification.
Recommendation Added tag, stylesheet, search, prev, prefetch, noreferrer, nofollow, next, license, icon, help, bookmark, author, and alternate.
HTML 4.01 Specification
The definition of '<link>' in that specification.
Recommendation  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) (Yes) (Yes) (Yes)
Alternative stylesheets ? 3.0 (1.9) ? (Yes) ?
prefetch          
prerender          
preconnect          
dns-prefetch          
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support (Yes) (Yes) 1.0 (1.0) (Yes) (Yes) (Yes) (Yes)
Alternative stylesheets ? ? 4.0 (2.0) ? ? ? ?

Etiquetas y colaboradores del documento

 Colaboradores en esta página: ivansx, vltamara
 Última actualización por: ivansx,