Home > front end >  Playing a .gif file with html
Playing a .gif file with html

Time:01-03

i started yesterday with html and I have issue. Everytime I try to open it in the website it shows just a black thing. This is the code:

<img src="Users\mkotz\OneDrive\Desktop\Eternity.gif"height="450"width="150" 
                loop="true"
                autoplay="true">

CodePudding user response:

Add before Users ,the following: .\Users....

CodePudding user response:

The link is probably invalid, Check that and try again.

CodePudding user response:

Everything seems to be alright with the code but the path you are referring to might be invalid. You should be considering using a path referring to the website and further its files.

In web development you should folder all your files something like this:

enter image description here

Add your image files always to the resources folder. Then you can refer to it from the index.html by saying src="./resources/<image_name>.gif" and so on.

  •  Tags:  
  • html
  • Related