Finally, we will add an image to the document by using the image tag: <img src="">. The name of the image goes between the quotation marks. In this case, we have an image called "simple.jpg" that is saved in the same directory as the html document we are creating.
If the image is stored in a directory other than that of the html document that is referencing it, the file path must be included. For example, if the image "simple.jpg" is saved in a directory named "images" inside of the directory the html file is located inside, the code would look like <img src="images/simple.jpg">
Note that this is an empty tag; it requires no closing tag.
|
<html> <head> <title>HTML, An Introduction</title> </head> <body> <h3>An Introduction to Hypertext Markup Language</h3> <img src="simple.jpg"> <h4>TUTORIAL DESCRIPTION</h4> <p>HTML is the basic language of the World Wide Web. If you are interested in creating webpages, HTML is the first thing you should learn. In this tutorial, you will</p><ul> <li>learn what HTML stands for</li> <li>learn some basic tags</li> <li>see an example of how a webpage would be encoded with HTML</li></ul> <hr> <h4>SOME EFFECTS OF HTML TAGS</h4><ol> <li>Making text <b>bold</b> or <i>italicized</i></li> <li>Changing the size of text</li> <li>Linking one document to another</li> <li>Creating numbered and non-numbered lists</li></ol> <hr> <h4>PREREQUISITES</h4> <p>You should have had some experience browsing the web, as well as some general experience with computers. Additionally, you should know how to save and retrieve documents on a computer.</p> <hr> <center> <h4>FURTHER READING</h4> <p>There are many other <br> html tutorials listed at <a href="http://www.yahoo.com">Yahoo</a>.</p> </center> </body> </html> |
What would this document look like in a web browser so far?
NEXT: >>