Search code examples
htmlimageimagesource

What wrong with this simple HTML Code?


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?


Solution

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