Are image maps <map> deprecated?

倾然丶 夕夏残阳落幕 提交于 2019-12-18 07:29:55

问题


Are image maps deprecated in (x)HTML?


回答1:


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.




回答2:


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.




回答3:


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.)



来源:https://stackoverflow.com/questions/3528746/are-image-maps-map-deprecated

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!