If you want the entire foreground “Britain” image to be a link, it’s really quite simple! All you need to do is wrap an <a>
tag around your <img>
tag, like so:
<a href="pagetwo.html"><img src="image/im.png" alt=""></a>
You don’t need to use usemap
at all! That’s only for special cases, like if you have an image with multiple, complex shapes on top of it, and want links over each of those shapes.
Example: BitDegree Area Map Example
In general, it’s considered better practice to style your images and such in your CSS code, instead of in your HTML coding (<img src="image/im.png" alt="" width="1366" height="768">
). Try writing:
img {
width: 1366px;
height: 768px;
}
Of course, this will alter ALL images on your page that way, so if you only want to identify that particular image, you should give it an id and identify it that way in your CSS.
If you want your code to be responsive, you can even add the following line:
img {
width: 1366px;
max-width: 100%;
height: 768px;
}
The max-width won’t allow your image to be any wider than the body of the HTML document. Providing you have the <meta name="viewport" content="width=device-width, initial-scale=1">
tag in the head of your document, this should make everything nicely responsive on mobile… though it will distort the image because of your height
property. (This can also be fixed, but it’s less simple. The more you add and the pickier you are, the more complicated it gets, of course. ;))