Align image vertically using the value sub in HTML and CSS

Description

The following code shows how to align image vertically using the value sub.

Example


<html>
<head>
<style rel="stylesheet" type="text/css">
p {<!--from w w w .  j  a va  2s  .  c  o m-->
font: 12pt arial;
}

img.sub {
vertical-align: sub;
}
s</style>
</head>

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

Click to view the demo

The code above generates the following result.

Align image vertically using the value sub in HTML and CSS