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.
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.