Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) examples for boolean attributes
git-svn-id: http://svn.whatwg.org/webapps@5345 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 25, 2010
1 parent da64867 commit 25f0496
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
22 changes: 20 additions & 2 deletions complete.html
Expand Up @@ -209,7 +209,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 24 August 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 25 August 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -3646,6 +3646,24 @@ <h4 id=boolean-attributes><span class=secno>2.4.2 </span>Boolean attributes</h4>
boolean attributes. To represent a false value, the attribute has to
be omitted altogether.</p>

<div class=example>

<p>Here is an example of a checkbox that is checked and disabled.
The <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code> and <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attributes are the
boolean attributes.</p>

<pre>&lt;label&gt;&lt;input type=checkbox checked name=cheese disabled&gt; Cheese&lt;/label&gt;</pre>

<p>This could be equivalently written as this:

<pre>&lt;label&gt;&lt;input type=checkbox checked=checked name=cheese disabled=disabled&gt; Cheese&lt;/label&gt;</pre>

<p>You can also mix styles; the following is still equivalent:</p>

<pre>&lt;label&gt;&lt;input type='checkbox' checked name=cheese disabled=""&gt; Cheese&lt;/label&gt;</pre>

</div>



<h4 id=keywords-and-enumerated-attributes><span class=secno>2.4.3 </span>Keywords and enumerated attributes</h4>
Expand Down Expand Up @@ -15201,7 +15219,7 @@ <h4 id=the-nav-element><span class=secno>4.4.3 </span>The <dfn><code>nav</code><
<em>...more content...</em>
&lt;/div&gt;
&lt;footer&gt;
&lt;p&gt;Posted &lt;time pubdate datetime="2009-10-10T14:36-08:00"&gt;Thursday&lt;/time&gt;.&lt;/p&gt;
&lt;p&gt;Posted &lt;time pubdate="" datetime="2009-10-10T14:36-08:00"&gt;Thursday&lt;/time&gt;.&lt;/p&gt;
&lt;/footer&gt;
&lt;/article&gt;
<em>...more blog posts...</em>
Expand Down
22 changes: 20 additions & 2 deletions index
Expand Up @@ -213,7 +213,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 24 August 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 25 August 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -3568,6 +3568,24 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
boolean attributes. To represent a false value, the attribute has to
be omitted altogether.</p>

<div class=example>

<p>Here is an example of a checkbox that is checked and disabled.
The <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code> and <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attributes are the
boolean attributes.</p>

<pre>&lt;label&gt;&lt;input type=checkbox checked name=cheese disabled&gt; Cheese&lt;/label&gt;</pre>

<p>This could be equivalently written as this:

<pre>&lt;label&gt;&lt;input type=checkbox checked=checked name=cheese disabled=disabled&gt; Cheese&lt;/label&gt;</pre>

<p>You can also mix styles; the following is still equivalent:</p>

<pre>&lt;label&gt;&lt;input type='checkbox' checked name=cheese disabled=""&gt; Cheese&lt;/label&gt;</pre>

</div>



<h4 id=keywords-and-enumerated-attributes><span class=secno>2.4.3 </span>Keywords and enumerated attributes</h4>
Expand Down Expand Up @@ -15123,7 +15141,7 @@ not-slash = %x0000-002E / %x0030-10FFFF
<em>...more content...</em>
&lt;/div&gt;
&lt;footer&gt;
&lt;p&gt;Posted &lt;time pubdate datetime="2009-10-10T14:36-08:00"&gt;Thursday&lt;/time&gt;.&lt;/p&gt;
&lt;p&gt;Posted &lt;time pubdate="" datetime="2009-10-10T14:36-08:00"&gt;Thursday&lt;/time&gt;.&lt;/p&gt;
&lt;/footer&gt;
&lt;/article&gt;
<em>...more blog posts...</em>
Expand Down
21 changes: 20 additions & 1 deletion source
Expand Up @@ -2598,6 +2598,25 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
boolean attributes. To represent a false value, the attribute has to
be omitted altogether.</p>

<div class="example">

<p>Here is an example of a checkbox that is checked and disabled.
The <code title="attr-input-checked">checked</code> and <code
title="attr-input-readonly">readonly</code> attributes are the
boolean attributes.</p>

<pre>&lt;label>&lt;input type=checkbox checked name=cheese disabled> Cheese&lt;/label></pre>

<p>This could be equivalently written as this:

<pre>&lt;label>&lt;input type=checkbox checked=checked name=cheese disabled=disabled> Cheese&lt;/label></pre>

<p>You can also mix styles; the following is still equivalent:</p>

<pre>&lt;label>&lt;input type='checkbox' checked name=cheese disabled=""> Cheese&lt;/label></pre>

</div>



<h4>Keywords and enumerated attributes</h4>
Expand Down Expand Up @@ -16066,7 +16085,7 @@ not-slash = %x0000-002E / %x0030-10FFFF
<em>...more content...</em>
&lt;/div>
&lt;footer>
&lt;p>Posted &lt;time pubdate datetime="2009-10-10T14:36-08:00">Thursday&lt;/time>.&lt;/p>
&lt;p>Posted &lt;time pubdate="" datetime="2009-10-10T14:36-08:00">Thursday&lt;/time>.&lt;/p>
&lt;/footer>
&lt;/article>
<em>...more blog posts...</em>
Expand Down

0 comments on commit 25f0496

Please sign in to comment.