Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
1  
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
add comment

1 Answer

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
1  
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
add comment

Your Answer

 
discard

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.