![]() |
VOOZH | about |
Width attribute in HTML <img> tags specifies the width of the image element in pixels or as a percentage of its containing element's width, controlling its visual size on the webpage.
Syntax:
<img width="pixels">Attribute Values: They contain single value pixels which specify the width of the image in pixels.
Example: In this example, we display the GeeksforGeeks logo using the <img> tag with the width attribute set to 200px, adjusting the image's width on the webpage.
Output:
The browser supported by HTML <img> width attribute are listed below: