O elemento ** Os atributos do elemento incluem os
atributos globais. Leva o usuário a salvar a URL em vez de navegar até ela. Pode
ser usado com ou sem um valor: Note: Notes:- A URL para a qual o hiperlink aponta. Links não se restrigem a URLs baseadas no protocolo HTTP — eles podem utilizar qualquer tipo de URL suportado pelos browsers: Hints at the human language of the linked URL. No built-in functionality. Allowed values are the same as the global Uma lista de URLs separadas por espaços. Quando o link é seguido, o brrowser enviará requisições Quanto do referrer para ser enviado quando acessar o link. Acesse
The relationship of the linked URL as space-separated
link types (en-US). Where to display the linked URL, as the name for a browsing context (a tab, window, or Note: Quando
usando Warning: Note: Linking to another page with Hints at the linked URL’s format with a MIME type (en-US). No built-in functionality. Hinted at the character encoding of the linked URL.
coords Obsolete since HTML5Used with the name Obsolete since HTML5Was required
to define a possible target location in a page. In HTML 4.01,
rev Obsolete since HTML5Specified a reverse link; the opposite of the shape Obsolete since HTML5The shape of the hyperlink’s region in an image map.
PropertiesExamplesLinking to an absolute URLHTML
ResultLinking to relative URLsHTML
ResultLinking to an element on the same page
Linking to an email addressTo create links that open in the user's email program to let them send a new message, use the
For details about Linking to telephone numbers
See RFC 3966 for syntax, additional features, and other details about the Using the download attribute to save a <canvas> as a PNGTo save a Example painting app with save linkHTML
CSS
JavaScript
ResultSecurity and privacy
Using AccessibilityStrong link textThe content inside a link should indicate where the link goes, even out of context. Inaccessible, weak link textA sadly common mistake is to only link the words “click here” or “here”:
Strong link textLuckily, this is an easy fix, and it’s actually shorter than the inaccessible version!
Assistive software have shortcuts to list all links on a page. However, strong link text benefits all users — the “list all links” shortcut emulates how sighted users quickly scan pages. onclick eventsAnchor elements are often abused as fake buttons by setting their These bogus Use a External links and linking to non-HTML resourcesLinks that open in a new tab/window via People experiencing low vision conditions, navigating with the aid of screen reading technology, or with cognitive concerns may be confused when a new tab, window, or application opens unexpectedly. Older screen-reading software may not even announce the behavior. Link that opens a new tab/window
Link to a non-HTML resource
If an icon is used to signify link behavior, make sure it has alt text:
Skip linksA skip link is a link placed as early as possible in <body> <a href="#content">Skip to main content</a> <header> … </header> <main id="content"> <!-- The skip link jumps to here -->
Skip links let keyboard users bypass content repeated throughout multiple pages, such as header navigation. Skip links are especially useful for people who navigate with the aid of assistive technology such as switch control, voice command, or mouth sticks/head wands, where the act of moving through repetitive links can be laborious.
Size and proximitySizeInteractive elements, like links, should provide an area large enough that it is easy to activate them. This helps a variety of people, including those with motor control issues and those using imprecise inputs such as a touchscreen. A minimum size of 44×44 CSS pixels is recommended. Text-only links in prose content are exempt from this requirement, but it’s still a good idea to make sure enough text is hyperlinked to be easily activated.
ProximityInteractive elements, like links, placed in close visual proximity should have space separating them. Spacing helps people with motor control issues, who may otherwise accidentally activate the wrong interactive content. Spacing may be created using CSS properties like
SpecificationsCompatibilidade com navegadoresBCD tables only load in the browser See also
|