Computer Science 8 - Lab 6 HTML

Introduction

In this week's HTML lab you are going to add hyperlinks and images to your web page.

To add a hyperlink to a web page, the <a> tag is used. To add an image to a web page, the <img> tag is used.

To see how these tags work, bring up the UCR home page, view its source, and do a search for the tags listed above; you will find several examples of both.

Adding the Tags

Add at least two hyperlinks to your web page. One should go to http://www.yahoo.com; the other can go to any web page you like.

Add an image to your web page. Note that this does not mean you actually have to download an image. Simply find an image you like on any web page, right-click on it, select Properties from the menu, and get the image's URL. Note that in the source code for the UCR home page, the width and height of the images are specified; however, you do not need to do that.

Add a second image to your web page, but make it a hyperpicture that links to a web page of your choice. To do this, simply put an <img> tag within an <a> tag. See the source code for the UCR home page for an example. Note that in the example, the <img> tag includes the border="0" attribute. View your web page with and without this attribute. What is the difference?