OUTPUT
So far, so good, Now you can add an image to the page. Suppose that you happen to have an image of a haunted house lying around on your hard drive: it would look excel-lent at the top of this web page. The image, called house. Jpg ,is in JPEG format. It’s located in the same directory as the Halloween. Html page, so adding it to the page will be easy.
Now, suppose that you want to place this image above the page heading. To do so, add an <imag> tag to file inside its own paragraph, just before the heading:
<p> <img src =”house, jpg” alt = “House of terror” /> </p>
<h1> welcome to the Halloween house of terror !!</h1>
Image, like links, don’t define their own text elements, so the <img> tag has to go inside a paragraph or heading element.
When you reload the Halloween, html page, you browser should include the haunted house image
on the page, as shown in figure 7.2
If the image doesn’t load and your browser displays a funny –looking icon in its place, make sure that you entered the filename properly in the HTML FILE, image filename are case sensitive, so all the uppercase and lowercase letters have to be correct.
If the case isn’t the problem, double-check the image file to make sure that it is indeed a GIF or JPEG image and that it has the proper file extension.
FIGURE 7.2 THE HALLOWEEN HOUSE HOME PAGE WITH THE HAUNTED HOUSE.
If one image is good, tow would e really good, right? Try adding another <img> tag next to the first one, s follows, and see what happens:
No comments:
Post a Comment