19.10.17

USE OF IMAGE AS A LINK

Similar to a text we can set an image itself as a link.

For Example:Develop a HTML page to use image as a link to another page.

STEP1:Write the XHTML document containing an hyperlink to an image.when we click on the image the html page  referred by the <a href>tag must get opened.

XHTML DOCUMENT[Imglink.html]

 <html xmlns="http://www.learnhtmeasyl.blogspot.com/2017/xhtml">
 <head>

<title>Image Demo</title>
  </head>
  <body>

<h2>INDIAN HERITAGE</h1>
</p>
<a href="flower.html"target="blank">
<img src="flower.jpg"alt="flower!!"/>
</a>
<br/>Flower Design
<br/>
</body>
</html>

STEP2:Write the XHTML document(flower.html)mentioned by the <a href> tag in step1 as follows.

XHTML DOCUMENT[Flower.html]


<html xmlns="http://www.learnhtmeasyl.blogspot.com/2017/xhtml">
 <head>

<title>Image Demo</title>
  </head>
  <body>

<h2>INDIAN HERITAGE</h1>
<p>
Flowers make a magic world
</br>
Flowers is an</strong>very beautiful</strong>like rose<strong>lilly</strong>
<br/>
It is considered as an example of flower
</p><br/>
</body>
</html>   

 

No comments:

Post a Comment

Featured Post