791 B
791 B
title | localeTitle |
---|---|
Img Width Attribute | Atributo Img Width |
Atributo Img Width
O atributo "largura" do HTML se refere à largura de uma imagem. O valor nas cotações é a quantidade de pixels.
Por exemplo, se você já tiver um link para uma imagem configurada por meio do atributo src
poderá adicionar o atributo width da seguinte forma:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Img Width Attribute</title>
</head>
<body>
<img src="image.png" alt="Image" width="100"/>
</body>
</html>
No snippet de código acima, há uma tag de imagem e a imagem é definida para uma largura de 100 pixels. width="100"