Links, Images, and Frames

Adding Images

Images can be added to a website to add color and style to a site. An image can be added using the <IMG SRC> tag

<IMG SRC = "pathname">

pathname is the path to the image you wish to link. If the image is in the same folder as the HTML document referencing it then all that is necessary is the name of the image.

Hypertext Links

Links are another very useful aspect of HTML design. Links are made using the <A> tag. This tag has several modifications that can be used for different purposes.

<A HREF = "url">: a link to the page with the url
<A HREF = "pathname">: a link to the HTML file with the pathname
<A HREF = "mailto: email">: a link to an email editor that will send an email to the email specified
<A NAME = "name">: labels a section to the name so that a link can jump to that section in the page
<A HREF = "#name">: a link to a section in the same page labelled with <A NAME>

Frames

Frames are a way of creating separate scrollable windows within one webpage. In order to create a website with frames, there is one frameset document. This document has <FRAMESET> tags instead of body tags. One document can have multiple <FRAMESET > tags to create multiple frames. Within in each <FRAMESET>, there is a <FRAME> tag that gives the name of the HTML document that appears within the frame.

<HTML>
<HEAD>
<TITLE>Title of the Page</TITLE>
</HEAD>

<FRAMESET cols="33%, 33%, 33%">
<FRAMESET rows"*,200">
<FRAME src=file.html>
<FRAME src=file2.html>
</FRAMESET>
<FRAME src=file3.html>
<FRAME src=file4.html>
</FRAMESET>
</HTML>

The above code creates 4 frames. Two are on top of each other vertically and take up 33% of the width. The other two go the full length of the screen and take up 33% of the screen each too. The "cols" modifier defines the frames that go across horizontally. The "rows" modifier defines the frames that go vertically. Too many frames can be stylistically awkward and not all browsers are frames compatible, so use them with caution

Sources

Objects, Images, and Applets in HTML Documents
Links in HTML Documents
Frames in HTML Documents