Page 114 - Plus_V2.2_C8_Flipbook
P. 114
Using CSS, the code can be given as follows:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Link as Image using CSS</TITLE>
<STYLE>
#IMAGE-BG {
background-image:url(coffee.jpg);
display:inline-block;
width:350px;
height:350px;
}
</STYLE>
</HEAD>
<BODY>
<H1> Images as links</H1>
<BR>
<HR>
<A HREF=COFFEE.HTML ID="IMAGE-BG"></A>
</BODY>
</HTML>
Output:
Tech Fact
Some of the image formats supported
by HTML are Joint Photographic
Experts Group (JPEG), Graphics
Interchange Format (GIF) and
Portable Network Graphics (PNG).
Image as link using CSS
Creating a web page using links
We are creating two linked web pages to show the navigation from one page to another and back.
112 Premium Edition-VIII

