<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. --> - [x] I have read [freeCodeCamp's contribution guidelines](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md). - [x] My pull request has a descriptive title (not a vague title like `Update index.md`) - [x] My pull request targets the `master` branch of freeCodeCamp.
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) |