HTML and CSS Reference
In-Depth Information
<a href=" http://faculty.purchase.edu/jeanine">
<img src="jhome.gif" width="100" />
</a>
Lets put these examples together now:
<html>
<head>
<title>Second example </title>
</head>
<body>
This will appear as is.
<img src="frog.jpg"/>
<img src="frog.jpg" width="200"/>
<a href= http://faculty.purchase.edu/jeanine.meyer> Jeanine Meyer's Academic
Activities </a>
<a href= http://faculty.purchase.edu/jeanine.meyer> <img src="jhome.gif"/></a>
</body>
</html>
I created the HTML file, saved it as second.html , and then opened it up in the Chrome browser. Figure 1-4
shows what is displayed.
Figure 1-4. Example with images and hyperlinks
This produces the text; the image in its original width and height; the image with the width fixed at 200
pixels and height proportional; a hyperlink that will take you to my web page (I promise); and another link
that uses an image that will also take you to my web page. However, this isn't quite what I had in mind. I
wanted these elements spaced down the page.
This demonstrates something you need to remember: HTML ignores line breaks and other white space. If
you want a line break, you have to specify it. One way is to use the br singleton tag. Ill show other ways
later. Take a look at the following modified code. Notice that the <br/> tags dont need to be on a line by
themselves.
 
Search WWH ::




Custom Search