26 lines
747 B
Markdown
26 lines
747 B
Markdown
---
|
|
title: Href Attribute
|
|
localeTitle: Atributo Href
|
|
---
|
|
## Atributo Href
|
|
|
|
Href es la abreviatura de "Referencia de hipertexto" y es un atributo HTML. El atributo href se usa principalmente para que las etiquetas `<a>` especifiquen la URL de una página web a la que conduce el enlace (ya sea en una sección diferente de la misma página o en una página web completamente diferente).
|
|
|
|
#### Cómo utilizar
|
|
|
|
`<a href="URL"></a>`
|
|
|
|
#### Ejemplos
|
|
|
|
```html
|
|
|
|
<a href="https://www.freecodecamp.org">This is an absolute URL</a>
|
|
|
|
<a href="index.html">This is a relative URL</a>
|
|
```
|
|
|
|
#### Más información:
|
|
|
|
[Escuelas w3](https://www.w3schools.com/tags/att_href.asp)
|
|
|
|
[HTMLElementReference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) |