Learn how to work with Images and Links in HTML

A web site is not a single page. It consists of several pages connected together. For example, when you click a text "About us", your browser automatically takes you to that web page. How is this magic occurring?.

It is through a concept of Links. Links are also called as Hyperlinks. You can also create links like this by using a HTML Tag called <A>. <A> stands for anchor.

Following example will help you to understand this concept.

<A href = "abc.htm">Go</A>

If you click Go, your browser connects you to abc.htm page. href is called as Hyper Text Reference.

Applicable Attributes

Target: This attribute is used to open up the page in a new Window.

Class: It denotes the style sheet class name

ID: It denotes the style sheet ID name

Images

It’s very easy to place images on a web page. Images can be of extensions .bmp, .gif, .jpeg etc. However, gif files are commonly used. Images can be placed by using <IMG>Tag.

An attribute called SRC is used to specify the path of the Image. For example, the code

<IMG src = "ballon.gif"> will place the image ballon.gif on the web page. You can specify the width and height as attributes to the <IMG> Tag. ALT attribute will enable you to add a Popup text when you move the mouse over the Image.

Giving Background Color to your Webpage

You can make the background of the web page to a specified color by using bgcolor attribute in the <BODY> tag. The code

<BODY bgcolor = "red"> will make the background color of the body to red. Similarly, if you require an Image to occupy the background of the Web page background attribute is used with the <BODY> tag as shown below:

<BODY background = "ballon.gif">

Leave a Comment