Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Add example and note for ismap, fixes #1303 (#1321)
Browse files Browse the repository at this point in the history
fixes #1303

Editorial:
* Add example and note for ismap

[I will commit then fix the typo - turns out to be easier that way :)]

Thank you!
  • Loading branch information
prlbr authored and chaals committed Apr 1, 2018
1 parent ea4d72e commit e16298d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions sections/semantics-embedded-content.include
Original file line number Diff line number Diff line change
Expand Up @@ -2305,6 +2305,31 @@
<a>boolean attribute</a>. The attribute must not be specified
on an element that does not have an ancestor <{a}> element
with an <{a/href}> attribute.

<div class="example">
In this example the user is asked to identify a person in an image by
clicking on it. The server could respond to a click by confirming the
correct position or by asking the user to try again.

<xmp highlight="html">
<figure>
<a href="solve.html">
<img src="zoo.jpg" ismap alt="Animals and people at the zoo, among them Wally with striped clothes">
</a>
<figcaption>Where’s Wally? Click on him!</figcaption>
</figure>
</xmp>

The coordinates where the user clicks are send to the server with the
request for the resource referenced by the <{a}> element’s
<code>href</code> attribute.
</div>

<p class="note">
The definition of the <{a}> element explains how the coordinates of the
<code>click</code> event on an <{img}> element with <code>ismap</code>
attribute inside an <{a}> element are communicated to the server.
</p>

<p class="note">
The <code>usemap</code> and <code>ismap</code> attributes can result in confusing behavior
Expand Down

0 comments on commit e16298d

Please sign in to comment.