Jump to content

usage of MAP tag !


Bhushan

Recommended Posts

HI Group,I am attaching a piece of code from w3schools.com regard to MAP tag. I need to know how does it work logically. I also found that it has got 2 sections like Client side mapping and server side mapping. What does it mean ??. We know that we include <area> tag inside <map> tag. What's the default attribute for <area> ??. Is it the rect or the square ??.kindly spend your precious time and let me know.Thanks in advance,Bhushan.<p>Click on one of the planets:</p><img src ="planets.gif"width ="145" height ="126"alt="Planets"usemap ="#planetmap" /><map id ="planetmap"name="planetmap"><area shape ="rect" coords ="0,0,82,126" href ="sun.htm" target ="_blank" alt="Sun" /><area shape ="circle" coords ="90,58,3" href ="mercur.htm" target ="_blank" alt="Mercury" /><area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /></map>

Link to comment
Share on other sites

Hi Dan,If you take a closer look at my code, you could see that I have attached the same piece of element. I am not able to understand the logic used there.Could you please explain me the code briefing about the logic.Thnx,Bhushan.

take a look at the tutorials, there is a JavaScriptal ImageMap, explanation of <map> and an explanation of <area>.:)

Link to comment
Share on other sites

Haven't you already read the explanations then? To me it was very clear :)Well, there are <map> and <area />.<map> should be used somehow like this: <map id="unique_identification">...</map>.<area /> should be used somehow like this:<area shape="some_predefined" coords="some_numbers" href="some_page.htm" target="somewhere" alt="some_text" />The links I gave are self explaning, if not to you, either fetch the attributes they list over there that you don't understand, or reread the (X)HTML tutorial :):(

Link to comment
Share on other sites

Hi Dan,Thank you very much for spnding some time. I am almost clear on this now. 1) Could you please let me know what is the default for <area> ?. Is it the rect or circle ?.2) One more thing, Is this <map id="panetmap" is going to take the value from <usemap="#planetmap" ??.Thanks in advance,Bhushan.

Haven't you already read the explanations then? To me it was very clear :)Well, there are <map> and <area />.<map> should be used somehow like this: <map id="unique_identification">...</map>.<area /> should be used somehow like this:<area shape="some_predefined" coords="some_numbers" href="some_page.htm" target="somewhere" alt="some_text" />The links I gave are self explaning, if not to you, either fetch the attributes they list over there that you don't understand, or reread the (X)HTML tutorial :):(

Link to comment
Share on other sites

1 The default of SHAPE attribute is not important, you should define it anytime :)2 Yes indeed, but it is the other way around. The usemap attribute gets the value of <map id="..."> :)

Edited by Dan The Prof
Link to comment
Share on other sites

Hi Dan,Thanks for your information.It may not be important to have a default value but there would be a default attribute value. Could you please tell me if you know the answer. Thnanks.

1 The default of SHAPE attribute is not important, you should define it anytime :)2 Yes indeed, but it is the other way around. The usemap attribute gets the value of <map id="..."> :)

Link to comment
Share on other sites

Could you please try to just "Fastreply" or "Addreply"? The quotes are getting familiar :)As for the default value, I don't have any clue what it is nor why you like to know it, the value you want it to be, shall alway override the default because you specify it. If you don't only then the default will work :)(I guess the rect might be default, but doesn't have to be)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...