Files
freeCodeCamp/mock-guide/spanish/html/attributes/img-src-attribute/index.md
Stuart Taylor 7da04a348b fix: Update packages and fix local dev (#26907)
<!-- 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.
2018-10-23 18:48:46 +05:30

42 lines
1.4 KiB
Markdown

---
title: Img Src Attribute
localeTitle: Atributo Img Src
---
## Atributo Img Src
El atributo `<img src>` refiere a la fuente de la imagen que desea mostrar. La etiqueta `img` no mostrará una imagen sin el atributo `src` . Sin embargo, si configura la fuente en la ubicación de la imagen, puede mostrar cualquier imagen.
Hay una imagen del logotipo de freeCodeCamp ubicado en `https://avatars0.githubusercontent.com/u/9892522?v=4&s=400`
Puedes establecer eso como la imagen usando el atributo `src` .
```html
<html>
<head>
<title>Img Src Attribute Example</title>
</head>
<body>
<img src="https://avatars0.githubusercontent.com/u/9892522?v=4&s=400">
</body>
</html>
```
El código de arriba se muestra así:
![El avatar de freeCodeCamp](https://avatars0.githubusercontent.com/u/9892522?v=4&s=400?raw=true)
El atributo `src` es compatible con todos los navegadores.
También puede tener un archivo alojado localmente como su imagen.
Por ejemplo, `<img src="images/freeCodeCamp.jpeg>` funcionaría si tuviera una carpeta llamada `images` que tuviera `freeCodeCamp.jpeg` dentro, siempre y cuando la carpeta 'images' estuviera en la misma ubicación que el archivo `index.html` .
`../files/index.html`
`..files/images/freeCodeCamp.jpeg`
### Más información:
* [HTML.com](https://html.com/attributes/img-src/)
* [Escuelas w3](https://www.w3schools.com/tags/att_img_src.asp)