Are image maps deprecated?

后端 未结 3 996
挽巷
挽巷 2020-12-20 11:39

Are image maps deprecated in (x)HTML?

相关标签:
3条回答
  • 2020-12-20 12:09

    It is in the HTML 5 draft spec.

    It also appears in the XHTML strict DTD:

    <!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map -->
    

    In short - it is part of both specs and is not deprecated.

    Some people do not like image maps because they perceive them as not very accessible or discoverable, and as such there are other markup/css/javascript techniques that work better.


    The map element doesn't appear in the obsolete section of the HTML 5 spec either. In fact, several obsolete features have a recommendation to use image maps instead.

    0 讨论(0)
  • 2020-12-20 12:18

    For the record, it is also still part of XHTML1.1 Strict with one change

    On the a and map elements, the name attribute has been removed in favor of the id attribute

    In the now dead XHTML2 any element could have been an Image Map, effectively making a separate element for it superfluous, which is the reason it was no longer part of the specification.

    0 讨论(0)
  • 2020-12-20 12:18

    Image maps are still part of HTML 5.0, of HTML 5.1 and of HTML 5.2. The map element was not listed in HTML 5.1's list of deprecated elements and is not listed in HTML 5.2's list of obsolete features.

    (HTML 5.0 became an official W3C Recommendation in October 2014; HTML 5.1 became an official W3C Recmmendation on 1 November 2016.)

    0 讨论(0)
提交回复
热议问题