skip to Main Content

I literally started learning html earlier today with WE3Schools
but I’m stuck on the part with image maps

heres my code

<img src="330px-Smiley.svg.png" alt="" usemap="#map" />
<map name="map">
    <area shape="rect" coords="67, 60, 257, 150" href="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Smiley.svg/330px-Smiley.svg.png" /> 
</map>

I want it so that when i click on the eye of the smiley face it opens the image but i cant seem to figure out what I’m doing wrong

ive tried 6 or so things none of which have worked i dont remember what exactly I did but it wasnt helpful anyway

2

Answers


  1. you need the elements img, map and area.
    also fyi, you say "heres my code" but you do not actually show the code. better help could be given if you added the code for context.
    have a good day, and bye!

    Login or Signup to reply.
  2. To create an image with HTML,you can use the tag. Here is a basic example.
    <imgenter code here srcenter code here= "image- url"enter code here
    alt = image description" >

    Replace:

    .image -urlenter code here with the URL of the image you want to display
    .image – description with a brief text describing the image (for accesibilityenter code here purposes)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search