Edit This Code:
<!DOCTYPE html>
<html>
<head>
<style>
img.top {
    vertical-align: text-top;
}


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

</style>
</head>
<body>

<p>An <img src="w3schools_logo.gif" alt="W3Schools" width="270" height="50"> image with a default alignment.</p><br>

<p>An <img class="top" src="w3schools_logo.gif" alt="W3Schools" width="270" height="50"> image with a text-top alignment.</p><br>

<p>An <img class="bottom" src="w3schools_logo.gif" alt="W3Schools" width="270" height="50"> image with a text-bottom alignment.</p>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy