img height Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:img

Introduction

The height attribute specifies the height of an image, in pixels.

Attribute Values

Value Description
pixels The height in pixels (e.g. height="100")

An image with a height and width of 42 pixels:

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials