Vertical alignment of an image using CSS

CSSWeb DevelopmentFront End Technology

To align an image vertically using CSS, use the vertical-align property. You can try to run the following code to align image vertically −

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         img {
            vertical-align: text-bottom;
         }
      </style>
   </head>
   <body>
      <p>This is <img src = "https://www.tutorialspoint.com/videotutorials/assets/videos/courses/155/images/course_155_image.png" alt000 = "Video Tutorial" width = "200" height = "150"> demo image.</p>
   </body>
</html>
raja
Published on 08-May-2018 08:08:06
Advertisements