<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>colgroup 要素 span 属性</h1><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> <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">colgroup</anchor></code> 要素の
<dfn><code class="HTMLa">span</code> 属性</dfn>は、
その <code class="HTMLe">colgroup</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><p>仕様書: <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/tables.html#adef-span-COLGROUP&quot;">IW:HTML4:&quot;struct/tables.html#adef-span-COLGROUP&quot;</anchor-external></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>
この属性の値の型は <code class="SGML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NUMBER</anchor></code> です。</p><p>仕様書本文によれば、この属性の値は正の整数でなければなりません。</p><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> この属性は省略可能です。</p><p>行群の行の数の決定方法については、 <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">colgroup</anchor></code>
要素の説明を参照してください。</p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section><section><h1>col 要素 span 属性</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> <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">col</anchor></code> 要素の
<dfn><code class="HTMLa">span</code> 属性</dfn>は、
その <code class="HTMLe">col</code> 
要素の属性を共有する<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">行</anchor>の数を表します。</p><p>仕様書: <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/tables.html#adef-span-COL&quot;">IW:HTML4:&quot;struct/tables.html#adef-span-COL&quot;</anchor-external></p><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>
この属性の値の型は <code class="SGML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NUMBER</anchor></code> です。</p><p>仕様書本文によれば、この属性の値は正の整数でなければなりません。</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> この属性は省略可能です。</p><p><code class="HTMLa">span</code> 属性が関係する、行の数の決定方法については、 
<code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">colgroup</anchor></code> 要素の説明を参照してください。</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> <code class="HTMLe">colgroup</code> 要素の <code class="HTMLa">span</code>
属性と働きは似ていますが、 <code class="HTMLe">colgroup</code>
が構造を表すのに対して、 <code class="HTMLe">col</code>
は構造を表さず、属性を共有するためのものですから、
<code class="HTMLa">span</code> 属性の意味も微妙に異なります。</p><p>たとえば、 <samp class="HTML">&lt;<code class="HTMLe">col</code> <code class="HTMLa">span</code>=&quot;3&quot; <var>attr</var>&gt;</samp>
は <samp class="HTML">&lt;<code class="HTMLe">col</code> <var>attr</var>&gt;&lt;<code class="HTMLe">col</code> <var>attr</var>&gt;&lt;<code class="HTMLe">col</code> <var>attr</var>&gt;</samp>
と意味的に等価です。しかし
<samp class="HTML">&lt;<code class="HTMLe">colgroup</code> <code class="HTMLa">span</code>=&quot;3&quot; <var>attr</var>&gt;</samp>
にはそのような等価性はありません。
<weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ただし <samp xmlns="http://www.w3.org/1999/xhtml" class="HTML">&lt;<code class="HTMLe">colgroup</code>&gt;&lt;<code class="HTMLe">col</code> <var>attr</var>&gt;&lt;<code class="HTMLe">col</code> <var>attr</var>&gt;&lt;<code class="HTMLe">col</code> <var>attr</var>&gt;</samp> と機能的に等価ではあります。</weak></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end>
HTML 4 DTD の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">注釈</anchor> (参考) には
<q>The SPAN attribute causes the attributes of one COL element to apply to more than one column.</q>
と説明があります。</p></section><section><h1>歴史</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><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> <cite xml:lang="en">Do not throw for zero colgroup/col.span and textarea.rows/cols</cite> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">domenic</anchor>著, <time>2016-08-20 00:52:06 +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/00b9b91548fbeb7a3c65bdaedf0a92d796183bcc">https://github.com/whatwg/html/commit/00b9b91548fbeb7a3c65bdaedf0a92d796183bcc</anchor-external></li></ul></refs><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> <cite xml:lang="en">Clamp col.span and colgroup.span to <strong>[</strong>1,1000<strong>]</strong></cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">davidsgrogan</anchor>著, <time>2017-06-03 08:59: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="https://github.com/whatwg/html/commit/84a6cf82d0f1dabc7b2988c105083c27f9cc5944">https://github.com/whatwg/html/commit/84a6cf82d0f1dabc7b2988c105083c27f9cc5944</anchor-external></p></section></body></html>