How to use an animated image in HTML page?

HTMLWeb DevelopmentFront End Technology

Animated images in HTML are an image on a web page that moves. It is in GIF format i.e. Graphics Interchange Format file.

To add an animated image in HTML is quite easy. You need to use the <image> tag with the src attribute. The src attribute adds the URL of the image.

Also, set the height and width of the image using the height and width attribute.

Example

You can try to run the following to work with the animated image in HTML −

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>Animated Image</title>
   </head>
   <body>
      <h1>Animated Image</h1>
      <img src="https://media.giphy.com/media/3o6UBpHgaXFDNAuttm/giphy.gif">
   </body>
</html>
raja
Published on 07-Feb-2018 12:58:28
Advertisements