- HTML 教程
- HTML 5简介
- HTML 5 视频
- HTML 5 音频
- HTML 5 Canvas
- HTML 5 Web 存储
- HTML 5 Input 类型
- HTML 5 表单元素
- HTML 5 表单属性
- HTML 5 参考手册
- HTML 5 标准事件属性
- <!-->
- <!DOCTYPE>
- <abbr>
- <acronym>
- <address>
- <applet>
- <area>
- <article>
- <aside>
- <audio>
- <b>
- <base>
- <basefont>
- <bdo>
- <blockquote>
- <body>
- <br />
- <button>
- <canvas>
- <caption>
- <center>
- <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite> 标签
- <col>
- <colgroup>
- <command>
- <datalist>
- <dd>
- <del>
- <details>
- <dir>
- <div>
- <dl>
- <dt>
- <embed>
- <fieldset>
- <figcaption>
- <figure>
- <font>
- <footer>
- <form>
- <frame>
- <frameset>
- <h1> 至 <h6>
- <head>
- <header>
- <hgroup>
- <hr>
- <html>
- <i>
- <iframe>
- <img>
- <input>
- <ins>
- <keygen>
- <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite>
- <label>
- <legend>
- <li>
- <link>
- <map>
- <mark>
- <menu>
- <meta>
- <meter>
- <nav>
- <noframes>
- <object>
- <ol>
- <optgroup>
- <option>
- <output>
- <p>
- <param>
- <pre>
- <progress>
- <q>
- <rp>
- <rt>
- <ruby>
- <s>
- <script>
- <section>
- <select>
- <small>
- <source>
- <span>
- <strike>
- <style>
- <sub> 和 <sup>
- <summary>
- <table>
- <tbody>
- <td>
- <textarea>
- <tfoot>
- <th>
- <thead>
- <time>
- <title>
- <tr>
- <tt>
- <u>
- <ul>
- <video>
定义和用法
<map> 标签定义客户端的图像映射。图像映射是带有可点击区域的图像。
HTML 4.01 与 HTML 5 之间的差异
在 HTML 5 中,不再支持 name 属性。
提示和注释:
注释:area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。
属性
属性 | 值 | 描述 | 4 | 5 |
id | unique_name | 为 map 标签定义唯一的名称。 | 4 | 5 |
name | unique_name | 为 map 标签定义唯一的名称。不支持。 | 4 |
标准属性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,请访问 HTML 5 中标准属性。
事件属性
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup,
onmousewheel, onresize, onscroll, onselect, onsubmit, onunload
如需完整的描述,请访问 HTML 5 中事件属性。
TIY 实例
创建图像地图
本例显示如何创建带有可点击区域的图像地图。其中的每个区域都是一个超级链接。
<html> <body> <p>请点击图像上的星球,把它们放大。</p> <img src="/i/eg_planets.jpg" border="0" usemap="#planetmap" alt="Planets" /> <map name="planetmap" id="planetmap"> <area shape="circle" coords="180,139,14" href ="/example/html/venus.html" target ="_blank" alt="Venus" /> <area shape="circle" coords="129,161,10" href ="/example/html/mercur.html" target ="_blank" alt="Mercury" /> <area shape="rect" coords="0,0,110,260" href ="/example/html/sun.html" target ="_blank" alt="Sun" /> </map> <p> <b>注释:</b> img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所 以我们同时向 map 元素添加了 "id" 和 "name" 属性。</p> </body> </html>