HTMLforall

  HTML | PHP | Forum

HTML <map> tag

Syntax

<map> - </map>

Definition and Usage

The MAP element contains coordinate data for client-side image maps.The MAP element is for use with an IMG or OBJECT. MAP's required NAME attribute is used as an anchor for the USEMAP attribute of the IMG or OBJECT.

Required Attributes

Attribute Value Description
id unique_name Defines a unique name for the map tag

Optional Attributes

Attribute Value Description
name unique_name Defines a unique name for the map tag (for backwards compability)

Standard Attributes

class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

tabindex, accesskey, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, onfocus, onblur

For a full description, go to Event Attributes.

Example

Source Output
<p>Click on the dog:</p>

<img src ="dog.gif"
width="180" height="120"
alt="Dog"
usemap ="#dogmap" >

<map id ="dogmap"
name="dogmap">
  <area shape ="rect" coords ="40,28,148,106"
  href ="dog.htm" target ="_blank"
  alt="Dog" /> 
</map>

Click on the dog:

Dog Dog

Home

Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

<!--...-->
<!DOCTYPE> 
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<dd>
<del>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<fieldset>
<font>
<form>
<frame>
<frameset>
<h1> to <h6>
<head>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<isindex>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<menu>
<meta>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<p>
<param>
<pre>
<q>
<s>
<samp>
<script>
<select>
<small>
<span>
<strike>
<strong>
<style>
<sub>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<title>
<tr>
<tt>
<u>
<ul>
<var>

 

Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us