html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <map> tag

Definition

The <map> tag is used to define to define a client-side image map that has clickable areas.

Example


<map id="lesson3"></map>

Required Attributes

id attribute specifies a unique identifier for the map.


<map id="idname"></map>

Optional Attributes

name attribute specifies a name for the map.


<map name="mapname"></map>

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<map class="classname"></map>

style - specifies an inline style for the element allowing you to apply the style to the content.


<map style="color:red;text-align:left"></map>

title - specifies extra information about the content.


<map title="information about the content"></map>

Language Attributes

dir - specifies the directional flow of the content.


<map dir="ltr"></map>   <!-- The text will flow from left to right -->

<map dir="rtl"></map>   <!-- The text will flow from right to left -->

lang - specifies a language code for the content of the element.


<map lang="en"></map>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<map xml:lang="fr"></map>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<map onkeydown="go()"></map>   <!-- Executes the go() function -->

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<map onkeypress="go()"></map>   <!-- Executes the go() function -->

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<map onkeyup="go()"></map>   <!-- Executes the go() function -->

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<map onclick="go()"></map>   <!-- Executes the go() function -->

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<map ondblclick="go()"></map>   <!-- Executes the go() function -->

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<map onmousedown="go()"></map>   <!-- Executes the go() function -->

onmousemove - The JavaScript code to be run when the mouse button is moved.


<map onmousemove="go()"></map>   <!-- Executes the go() function -->

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<map onmouseout="go()"></map>   <!-- Executes the go() function -->

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<map onmouseover="go()"></map>   <!-- Executes the go() function -->

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<map onmouseup="go()"></map>   <!-- Executes the go() function -->


<link /> tag    << Prev          Next >>   <menu> tag

go to home page Homepage go to top of page Top

HTML Elements

The complete set of HTML elements also known as HTML tags from the latest HTML 4.01 Specification.

Click the links for more information on individual tags and their attributes.

<!--...-->

<!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> - <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>