Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my app I need to display some maps. So I use Leaflet.js to do so, but to simplify my HTML I have used a <map> tag to do so. Is that acceptable, or should I avoid doing this?

share|improve this question
What do you mean by using map to display some maps and by changing the behavior of old tags? The map element does not display anything (it only defines areas in an image). – Jukka K. Korpela Jun 17 '13 at 10:19
map is not an old element and is part of HTML5. – Rob Jun 17 '13 at 11:21
I don't found any info that map is deprecated. I mean that in my JS I'm looking for all <map> tags, in them I create <div> with unique, generated id and in them I display my Leaflet map. – Łukasz Niemier Jun 17 '13 at 11:27

From accessibility this would be incorrect, because <map> tag is:

The map element, in conjunction with any area element descendants, defines an image map.

(source from W3C)

StackOverflow gives a good answer about custom elements.

share|improve this answer
No. Do not create your own HTML tags. Use XHTML if you want to do that. Otherwise, don't. – Rob Jun 17 '13 at 11:25
@Rob thanks for your comment , you are right! Edited the answer! – Igor-G Jun 17 '13 at 11:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.