Align image vertically to text-bottom in HTML and CSS

Description

The following code shows how to align image vertically to text-bottom.

Example


<html>
<head>
<!--  w ww.  j av  a  2  s.  c  o m-->

<style rel="stylesheet" type="text/css">
p {
font: 12pt arial;
}

img.text-bottom {
vertical-align: text-bottom;
}

</style>
</head>

<body>
<p><img class="text-bottom" src="http://www.java2s.com/style/download.png"
alt="plane" width="74" height="74" />
The image is vertically aligned using the value text-bottom </p>
</body>
</html>

Click to view the demo

The code above generates the following result.

Align image vertically to text-bottom in HTML and CSS