HTML CSS examples for HTML Tag:img
The height attribute specifies the height of an image, in pixels.
Value | Description |
---|---|
pixels | The height in pixels (e.g. height="100") |
An image with a height and width of 42 pixels:
<!DOCTYPE html> <html> <body> <img src="https://www.java2s.com/style/demo/Opera.png" alt="Smiley face" width="42" height="42"> </body><!--from w w w. ja va 2 s. c o m--> </html>