Files
freeCodeCamp/mock-guide/spanish/html/attributes/img-align-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

1.2 KiB

title, localeTitle
title localeTitle
Img Align Attribute Img Align Attribute

Img Align Attribute

El atributo de alineación de una imagen especifica dónde se debe alinear la imagen de acuerdo con el elemento circundante.

Valores de atributo:
derecha - alinear imagen a la derecha izquierda - alinear imagen a la izquierda
superior: alinear la imagen con la parte superior
inferior: alinear la imagen con la parte inferior
medio - alinea la imagen con el medio

Por ejemplo:


<!DOCTYPE html> 
 <html lang="en"> 
  <head> 
   <title>Img Align Attribute</title> 
 </head> 
 <body> 
  <p>This is an example. <img src="image.png" alt="Image" align="middle"> More text right here 
  <img src="image.png" alt="Image" width="100"/> 
  </body> 
 </html> 

También podemos alinearnos a la derecha si queremos:


<p>This is another example<img src="image.png" alt="Image" align="right"></p> 

Tenga en cuenta que el atributo de alineación no es compatible con HTML5, y debería usar CSS en su lugar. Sin embargo, todavía es compatible con todos los principales navegadores.

Más información:

Artículo de MDN sobre la etiqueta img y sus atributos.