aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/htmlanchorelement
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:45 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:45 -0500
commit1109132f09d75da9a28b649c7677bb6ce07c40c0 (patch)
tree0dd8b084480983cf9f9680e8aedb92782a921b13 /files/es/web/api/htmlanchorelement
parent4b1a9203c547c019fc5398082ae19a3f3d4c3efe (diff)
downloadtranslated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.gz
translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.bz2
translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.zip
initial commit
Diffstat (limited to 'files/es/web/api/htmlanchorelement')
-rw-r--r--files/es/web/api/htmlanchorelement/index.html279
1 files changed, 279 insertions, 0 deletions
diff --git a/files/es/web/api/htmlanchorelement/index.html b/files/es/web/api/htmlanchorelement/index.html
new file mode 100644
index 0000000000..57cb21820e
--- /dev/null
+++ b/files/es/web/api/htmlanchorelement/index.html
@@ -0,0 +1,279 @@
+---
+title: HTMLAnchorElement
+slug: Web/API/HTMLAnchorElement
+tags:
+ - API
+ - HTML DOM
+ - Interfaz
+ - Referencia
+translation_of: Web/API/HTMLAnchorElement
+---
+<div>{{APIRef ("HTML DOM")}}<br>
+La interfaz <strong>HTMLAnchorElement</strong> representa elementos de hipervínculo y proporciona propiedades y métodos especiales (más allá de los de la interfaz de objeto {{domxref ("HTMLElement")}} regular de la que heredan) para manipular el diseño y la presentación de dichos elementos.</div>
+
+<h2 id="Propiedades">Propiedades</h2>
+
+<p>{{InheritanceDiagram(600, 120)}}</p>
+
+<p>Hereda propiedades de su elemento primario, {{domxref ("HTMLElement")}}, y las implementa desde {{domxref ("HTMLHyperlinkElementUtils")}}.</p>
+
+<p>{{domxref ("HTMLAnchorElement.accessKey")}}<br>
+ Es un {{domxref ("DOMString")}} que representa un solo carácter que cambia el foco de entrada al hipervínculo.</p>
+
+<p><br>
+ {{domxref ("HTMLAnchorElement.charset")}} {{obsolete_inline}}<br>
+ Es un {{domxref ("DOMString")}} que representa la codificación de caracteres del recurso vinculado.</p>
+
+<p><br>
+ {{domxref ("HTMLAnchorElement.coords")}} {{obsolete_inline}}<br>
+ Es un {{domxref ("DOMString")}} que representa una lista de coordenadas separadas por comas.</p>
+
+<p> </p>
+
+<dl>
+ <dt>{{domxref ("HTMLAnchorElement.download")}} {{experimental_inline}}<br>
+ Es un {{domxref ("DOMString")}} que indica que el recurso vinculado está destinado a descargarse en lugar de mostrarse en el navegador. El valor representa el nombre propuesto del archivo. Si el nombre no es un nombre de archivo válido del sistema operativo subyacente, el navegador lo adaptará.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.hash")}}<br>
+ Es un {{domxref ("USVString")}} que representa el identificador de fragmento, incluida la marca hash inicial ('#'), si la hay, en la URL a la que se hace referencia.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.host")}}<br>
+ Es un {{domxref ("USVString")}} que representa el nombre de host y el puerto (si no es el puerto predeterminado) en la URL a la que se hace referencia.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.hostname")}}<br>
+ Es un {{domxref ("USVString")}} que representa el nombre de host en la URL referenciada.</dt>
+ <dd> </dd>
+ <dt>{{domxref ("HTMLHyperlinkElementUtils.href")}}<br>
+ Es un {{domxref ("USVString")}} que refleja el atributo HTML {{htmlattrxref ("href", "a")}}, que contiene una URL válida de un recurso vinculado.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.hreflang")}}<br>
+ Es un {{domxref ("DOMString")}} que refleja el atributo HTML {{htmlattrxref ("hreflang", "a")}}, que indica el idioma del recurso vinculado.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.media")}}<br>
+ Es un {{domxref ("DOMString")}} que refleja el atributo HTML {{htmlattrxref ("media", "a")}}, que indica los medios previstos para el recurso vinculado.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.name")}} {{obsolete_inline}}<br>
+ Es un {{domxref ("DOMString")}} que representa el nombre del ancla.<br>
+ {{domxref ("HTMLHyperlinkElementUtils.password")}}<br>
+ Es un {{domxref ("USVString")}} que contiene la contraseña especificada antes del nombre de dominio.</dt>
+ <dd> </dd>
+ <dt>{{domxref ("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}<br>
+ Devuelve un {{domxref ("USVString")}} que contiene el origen de la URL, que es su esquema, su dominio y su puerto.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.pathname")}}<br>
+ Es un {{domxref ("USVString")}} que representa el componente del nombre de ruta, si lo hay, de la URL referenciada.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.port")}}<br>
+ Es un {{domxref ("USVString")}} que representa el componente de puerto, si lo hay, de la URL a la que se hace referencia.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.protocol")}}<br>
+ Es un {{domxref ("USVString")}} que representa el componente de protocolo, incluidos los puntos finales (':'), de la URL a la que se hace referencia.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.referrerPolicy")}} {{experimental_inline}}<br>
+ Es un {{domxref ("DOMString")}} que refleja el atributo {{htmlattrxref ("referrerpolicy", "a")}} HTML que indica qué referencia usar.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.rel")}}<br>
+ Es un {{domxref ("DOMString")}} que refleja el atributo HTML {{htmlattrxref ("rel", "a")}}, que especifica la relación del objeto de destino con el objeto vinculado.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.relList")}} {{readonlyInline}}<br>
+ Devuelve un {{domxref ("DOMTokenList")}} que refleja el atributo HTML {{htmlattrxref ("rel", "a")}}, como una lista de tokens.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.rev")}} {{obsolete_inline}}<br>
+ Es un {{domxref ("DOMString")}} que representa el atributo HTML {{htmlattrxref ("rev", "a")}}, que especifica la relación del objeto de enlace con el objeto de destino.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.search")}}<br>
+ Es un {{domxref ("USVString")}} que representa el elemento de búsqueda, incluido el signo de interrogación principal ('?'), Si lo hay, de la URL a la que se hace referencia.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.shape")}} {{obsolete_inline}}<br>
+ Es un {{domxref ("DOMString")}} que representa la forma del área activa.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.tabindex")}}<br>
+ Es un largo que contiene la posición del elemento en el orden de navegación de tabulación para el documento actual.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.target")}}<br>
+ Es un {{domxref ("DOMString")}} que refleja el atributo HTML {{htmlattrxref ("target", "a")}}, que indica dónde mostrar el recurso vinculado.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.text")}}<br>
+ Es un {{domxref ("DOMString")}} un sinónimo de la propiedad {{domxref ("Node.textContent")}}.</dt>
+ <dt><br>
+ {{domxref ("HTMLAnchorElement.type")}}<br>
+ Es un {{domxref ("DOMString")}} que refleja el atributo HTML {{htmlattrxref ("type", "a")}}, que indica el tipo MIME del recurso vinculado.</dt>
+ <dt><br>
+ {{domxref ("HTMLHyperlinkElementUtils.nombre de usuario")}}<br>
+ Es un {{domxref ("USVString")}} que contiene el nombre de usuario especificado antes del nombre de dominio.</dt>
+</dl>
+
+<h2 id="Metodos">Metodos</h2>
+
+<p>Hereda los métodos de su padre, {{domxref ("HTMLElement")}}, y los implementa desde {{domxref ("HTMLHyperlinkElementUtils")}}.</p>
+
+<p>{{domxref ("HTMLElement.blur ()")}}<br>
+ Elimina el foco del teclado del elemento actual.<br>
+ {{domxref ("HTMLElement.focus ()")}}<br>
+ Da el foco del teclado al elemento actual.<br>
+ {{domxref ("HTMLHyperlinkElementUtils.toString ()")}}<br>
+ Devuelve un {{domxref ("USVString")}} que contiene la URL completa. Es un sinónimo de {{domxref ("URLUtils.href")}}, aunque no se puede usar para modificar el valor.<br>
+ Los métodos blur () y focus () se heredan de {{domxref ("HTMLElement")}} de HTML5 on, pero se definieron en HTMLAnchorElement en DOM Level 2 HTML y especificaciones anteriores.</p>
+
+<p> </p>
+
+<p> </p>
+
+<h2 id="Especificaciones">Especificaciones</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Epecificacion</th>
+ <th scope="col">Estado</th>
+ <th scope="col">Commentario</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Referrer Policy', '#referrer-policy-delivery-referrer-attribute', 'referrer attribute')}}</td>
+ <td>{{Spec2('Referrer Policy')}}</td>
+ <td>Se agregó la propiedad de referencia.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "text-level-semantics.html#the-a-element", "HTMLAnchorElement")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Se agregó el refe. Se agregó la siguiente propiedad: descargar.<br>
+ Técnicamente, las propiedades relacionadas con URL, medios, host, nombre de host, ruta, puerto, protocolo, búsqueda y hash, se han movido a la interfaz {{domxref ("URLUtils")}}, y HTMLAreaElement implementa esta propiedad de interface.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', "text-level-semantics.html#the-a-element", "HTMLAnchorElement")}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td>Los métodos blur () y focus (), así como las propiedades tabindex y accessKey, ahora están definidos en {{domxref ("HTMLElement")}}.<br>
+ Las siguientes propiedades ahora están obsoletas: charset, coords, name, rev y shape.<br>
+ Se han agregado las siguientes propiedades: hash, host, nombre de host, medios, ruta, puerto, protocolo, relList, búsqueda y texto.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM2 HTML', 'html.html#ID-48250443', 'HTMLAnchorElement')}}</td>
+ <td>{{Spec2('DOM2 HTML')}}</td>
+ <td>Sin cambios desde {{SpecName ("DOM1")}}.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM1', 'level-one-html.html#ID-48250443', 'HTMLAnchorElement')}}</td>
+ <td>{{Spec2('DOM1')}}</td>
+ <td>definicion Inicial .</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop(1.0)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>download</code></td>
+ <td>{{CompatChrome(14)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>20</td>
+ <td>{{CompatUnknown}}</td>
+ <td>15</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>username</code>, <code>password</code>, and <code>origin</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop("26.0")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>referrerPolicy</code></td>
+ <td>{{CompatChrome(51)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop("50")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android Webview</th>
+ <th>Chrome for Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile(1.0)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>download</code></td>
+ <td>{{CompatChrome(14)}}</td>
+ <td>{{CompatChrome(14)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>username</code>, <code>password</code>, and <code>origin</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoMobile("26.0")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>referrerPolicy</code></td>
+ <td>{{CompatChrome(51)}}</td>
+ <td>{{CompatChrome(51)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoMobile("50")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Ver_tambien">Ver tambien</h2>
+
+<ul>
+ <li>El elemento HTML que implementa esta interfaz: {{HTMLElement ("a")}}</li>
+</ul>