How to add GIF in HTML?

In this blog post, you will learn about adding a GIF in HTML. Adding a GIF is very easy in HTML. If you know about the image tag then it will be easy for you to understand and add a GIF quickly. Let us learn in detail about it:-

GIF IN HTML

A GIF can be also called an Animated Image. So the same image or img tag can be used to add a gif. In the src attribute of the image tag just place the address of the gif instead of the address of an image. After this add the alt, width, and height attributes to the img tag. So the full code and output for this html question is as follows:- 

Index.html

<html>
    <head>
        <title>GIF in HTML</title>
    </head>
    <body>
        <h1> Codeblockx </h1>
        <h2> Solution for all your Coding Problems </h2>
        <h3> HTML allows GIF </h3>
        <img src=”man-1835_512.gif” alt=”Computer Man” width=”200px” height=”300px”>
    </body>
</html>

OUTPUT

As you have now mastered adding a GIF. You should now move a step ahead and learn about adding a Image Gallery in HTML >. This helps in making a image gallery in your website. So check out the detailed blog on it, that will help you out.

 

Hope this blog post was helpful to you and you have got the answer to your question. Thank you for visiting our blog. If you have any doubts about the coding questions then let us know in the comments section we will answer them as soon as possible.

Leave a Comment

Your email address will not be published. Required fields are marked *