i donloaded and image to use as a background image with text for an example website but i can't see it on my browser

Viewed 14

i have tried using the image tag and i copied the image i downloaded as path but i can't seet it when i go live on my browser.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Smart UV</title>
</head>
<body>
    <div>
        <h1>SmartUV</h1>
        <nav class="topnav-right">
          <a href="#">Home</a>
          <a href="#">Products</a>
          <a href="#">How it works</a>
          <a href="#"></a>
        </nav>

        <div class="container">
            <img src="C:\Users\TIMILEHIN\Downloads\pexels-cats-coming-707582.jpg" alt="">
        </div>


    </div>
</body>
</html>
2 Answers

Put the image on the SAME FOLDER of the rest of your files. Example, if your HTML is on folder called "site" you can create a folder inside "site" called "img" an putting here the image.

And the route should be:

<img src="site/img/pexels-cats-coming-707582.jpg" alt="">

This is a LOCAL address:

C:\Users\TIMILEHIN\Downloads\pexels-cats-coming-707582.jpg

It means the picture is in your hard drive. It needs to be somewhere on the net instead.

Related