Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

HTML image not showing up even after changing everything

I am new to HTML and currently learning how to put an image on my site. But for some reason it won’t show up. Googled around and tried most things like changing up the image link in the srs="" as to puting a width and height.
For now, I have tried:

<img srs="tree.jpg" alt="tree"/>
<img srs="file:///C:/Users/Name/Desktop/html/tree.jpg" alt="tree"/>

tried putting it in a folder and tried:

<img srs="images/tree.jpg" alt="tree"/>

but to no avail. After a while tried switching up the images tried with a png after that with a link in the web all of them don’t display on my site. As a text editor I am using VS Code with a Live Server extension.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Here is the full program:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="description" content="This is the description of the website">
        <title>Title of the Website</title>
    </head>
    <body>

        <img srs="tree.jpg" alt="tree"/>

    </body>
</html>

>Solution :

Replace "srs" with "src" (src stands for source like the source of the image file) and that should work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading