What wrong with this simple HTML Code?
-
17-06-2021 - |
Domanda
I am completely new to Web Development, still a student. Kindly bare this extremely low level question.
I have this small HTML code:
<html>
<body>
<img scr="logo.jpg" alt"nextgen logo" width="370" height="100" />
<h1> NEXTZEN </h1>
<p> Welcome to NEXTZEN </p>
</body>
</html>
with the logo.jpg file in the exact same folder as the .html file, with the exact width and height given.
Yet, when I open the HTML page, I am not able to see the image at all. What's Wrong? What should I do?
Soluzione
<html>
<body>
<img src="logo.jpg" alt="nextgen logo" width="370" height="100" />
<!-- fix src and add in the = on the alt tag !-->
<h1> NEXTZEN </h1>
<p> Welcome to NEXTZEN </p>
</body>
</html>
Altri suggerimenti
simple typo. src
, not scr
<img src="logo.jpg" alt="nextgen logo" width="370" height="100" />
You need to change scr
to src
in your image tag, and add an = sign as Florian pointed out.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow