<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>a 要素・area 要素 coords 属性 (HTML, XHTML 1)</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor> の <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">a</anchor></code> 要素および <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">area</anchor></code>
要素の <dfn><code class="HTMLa">coords</code> 属性</dfn>は、
領域の位置と形を指定します。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> 仕様書:
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;struct/objects.html#adef-coords&quot;">IW:HTML4:&quot;struct/objects.html#adef-coords&quot;</anchor-external></p><section><h1>属性値</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> この属性の値は <code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Coords</anchor></code> です。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SGML</anchor> 的には <code class="SGML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CDATA</anchor></code> です。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> この属性は省略可能です。</p><p>仕様書には明記されていませんが、 <code class="HTMLe">area</code>
の場合 <code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">shape</anchor></code> が <code class="HTML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">default</anchor></code>
以外なら必須、 <code class="HTMLe">a</code> の場合 <code class="HTML">default</code>
の場合と画像写像の領域にしない場合以外は必須と思われます。
(そうしなければ意味を成しません。)</p></section><section><h1>歴史</h1><section><h1>大域属性としての使用</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XHTML2</anchor> では <code class="HTMLa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">src</anchor></code> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">大域属性</anchor>化に伴い
<code class="HTMLa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">coords</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">属性</anchor>も<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">大域属性</anchor>となりました。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><cite xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">- XHTML Attribute Collections</cite> (<time xmlns="http://www.w3.org/1999/xhtml">2002-12-12 23:58:38 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.w3.org/TR/2002/WD-xhtml2-20021211/mod-attribute-collections.html#adef_attribute-collections_coords">http://www.w3.org/TR/2002/WD-xhtml2-20021211/mod-attribute-collections.html#adef_attribute-collections_coords</anchor-external></comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <pre class="HTML example code">&lt;html xmlns=&quot;http://www.w3.org/2002/06/xhtml2&quot;&gt;
   &lt;head&gt;
      &lt;title&gt;The cool site!&lt;/title&gt;
   &lt;/head&gt; 
   &lt;body&gt;
     &lt;p src=&quot;navbar1.png&quot; type=&quot;image/png&quot; usemap=&quot;#map1&quot;&gt; 
       &lt;map id=&quot;map1&quot;&gt;
         &lt;nl&gt;
           &lt;label&gt;Navigate the site:&lt;/label&gt;
           &lt;li href=&quot;guide.html&quot; shape=&quot;rect&quot; coords=&quot;0,0,118,28&quot;&gt;
           Access Guide&lt;/li&gt; 
           &lt;li href=&quot;shortcut.html&quot; shape=&quot;rect&quot; coords=&quot;118,0,184,28&quot;&gt;
           Go&lt;/li&gt; 
           &lt;li href=&quot;search.html&quot; shape=&quot;circle&quot; coords=&quot;184,200,60&quot;&gt;
           Search&lt;/li&gt;
           &lt;li href=&quot;top10.html&quot; shape=&quot;poly&quot; coords=&quot;276,0,276,28,100,200,50,50,276,0&quot;&gt;
           Top Ten&lt;/li&gt;
         &lt;/nl&gt;
       &lt;/map&gt; 
      &lt;/p&gt;
   &lt;/body&gt;
&lt;/html&gt; </pre></p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;9</anchor-internal> 仕様案より</comment-p></section></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end>
<cite xml:lang="en-us">coords Property (A, AREA)</cite> (<code>2007-05-02 10:44:26 +09:00</code> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://msdn2.microsoft.com/en-us/library/ms533695.aspx">http://msdn2.microsoft.com/en-us/library/ms533695.aspx</anchor-external>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor>)</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end>
<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;5</anchor-internal></p><blockquote><p>For <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">a</anchor></code> objects, you must set the value of this property before you can retrieve it. This satisfies the requirements of World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link. The page author is responsible for implementing the functionality defined in HTML 4.0 World Wide Web link for <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">a</anchor></code> objects, if desired.</p></blockquote><p>意味がわからない。
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor> <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">2007-05-02 01:49:01 +00:00</weak>)</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end>
<cite>Re: Image maps: should we drop &lt;a coords=&quot;&quot;&gt;?</cite> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Ian Hickson</anchor> 著, <code>2007-08-06 21:22:19 +09:00</code> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/11585">http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/11585</anchor-external></p><blockquote><p>Regarding &lt;a coords=&quot;&quot;&gt;, I don't think it's used any more now than when I 
decided not to include it in HTML5, so I'm still of the opinion that not 
including it is a good thing.</p></blockquote><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <cite>The SMIL 3.0 Linking Modules</cite> (<time>2008-12-02 00:45:09 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.w3.org/TR/2008/REC-SMIL3-20081201/smil-extended-linking.html#adef-coords">http://www.w3.org/TR/2008/REC-SMIL3-20081201/smil-extended-linking.html#adef-coords</anchor-external></p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite><strong></strong>[<strong></strong>whatwg<strong></strong>]<strong></strong> Image maps: should we drop &lt;a coords=&quot;&quot;&gt;?</cite>
( (<time>2011-01-19 23:53:23 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-April/003508.html">http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-April/003508.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <cite xml:lang="en">Revamp coords parsing to be more compatible and less insane · whatwg/html@ead6cfe</cite>
(<time>2016-01-30 20:58:07 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/ead6cfe392d338b66ed85fa84855061fd0990431">https://github.com/whatwg/html/commit/ead6cfe392d338b66ed85fa84855061fd0990431</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite xml:lang="en">Google Maps JavaScript API V3 Reference  |  Google Maps JavaScript API  |  Google Developers</cite>
( (<time>2016-06-01 10:39:27 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developers.google.com/maps/documentation/javascript/reference?csw=1#MarkerShape">https://developers.google.com/maps/documentation/javascript/reference?csw=1#MarkerShape</anchor-external></figcaption><blockquote><p>Type:  Array&lt;number&gt;</p><p>The format of this attribute depends on the value of the type and follows the w3 AREA coords specification found at http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords. </p><p>The coords attribute is an array of integers that specify the pixel position of the shape relative to the top-left corner of the target image. The coordinates depend on the value of type as follows: </p><p>  - circle: coords is <strong>[</strong>x1,y1,r<strong>]</strong> where x1,y2 are the coordinates of the center of the circle, and r is the radius of the circle. </p><p>  - poly: coords is <strong>[</strong>x1,y1,x2,y2...xn,yn<strong>]</strong> where each x,y pair contains the coordinates of one vertex of the polygon. </p><p>  - rect: coords is <strong>[</strong>x1,y1,x2,y2<strong>]</strong> where x1,y1 are the coordinates of the upper-left corner of the rectangle and x2,y2 are the coordinates of the lower-right coordinates of the rectangle.</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <cite xml:lang="en">Editorial: always state invalid value default</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">GloverDonovan</anchor>著, <time>2018-03-05 13:36:29 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/7e941ae96b264d4743ea0afac00c3b3209ab0cde">https://github.com/whatwg/html/commit/7e941ae96b264d4743ea0afac00c3b3209ab0cde</anchor-external></p></section></body></html>