Advertisements
Advertisements
Question
Online Gadgets is an electronic products company. The company wishes to sell its products online for which they want to launch its website. The homepage of the website should contain the images of its products which are saved as PHONE.JPG and TV.JPG. The company wishes to open the webpage named ALLPHONES. HTML when the image PHONE.JPG is clicked. Similarly, on clicking the image TV.JPG a different webpage named as ALLTVS.HTML should open. Ensure that both the image should get displayed with a width of 200 pixels and a height of 150 pixels.
Write the code to achieve the desired result.
Note: Assume that the image and both the webpages are stored in the same folder.
Code Writing
Solution
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Online Gadgets</title>
</head>
<body>
<!-- Clickable Image for Phones-->
<a href="ALLPHONES.HTML"><img src="PHONE.jpg" alt="Phones" width="200" height="150"</a>
<!-- Clickable Image for TVs-->
<a href="ALLTVS.HTML"><img src="TV.JPG" alt="TVs" width="200" height="150"></a>
</body>
</html>
shaalaa.com
Is there an error in this question or solution?