Skip to content

Commit

Permalink
[] (0) Remove line breaks from title='' examples. (credit: sp) (bug 6…
Browse files Browse the repository at this point in the history
…497)

git-svn-id: http://svn.whatwg.org/webapps@2934 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 31, 2009
1 parent 7d47d83 commit 45e6009
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 30 deletions.
46 changes: 31 additions & 15 deletions index
Expand Up @@ -7819,6 +7819,18 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
multiple lines. Each U+000A LINE FEED (LF) character represents a
line break.</p>

<div class=example>

<p>Caution is advised with respect to the use of newlines in <code title=attr-title><a href=#the-title-attribute>title</a></code> attributes.</p>

<p>For instance, the following snippet actually defines an
abbreviation's expansion <em>with a line break in it</em>:</p>

<pre class=bad>&lt;p&gt;My logs show that there was some interest in &lt;abbr title="Hypertext
Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>

</div>

<p>Some elements, such as <code><a href=#the-link-element>link</a></code>, <code><a href=#the-abbr-element>abbr</a></code>, and
<code><a href=#the-input-element>input</a></code>, define additional semantics for the <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute beyond the semantics
described above.</p>
Expand All @@ -7832,6 +7844,7 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
</div>



<h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.3.3.3 </span>The <dfn title=attr-lang><code>lang</code></dfn> and <dfn title=attr-xml-lang><code>xml:lang</code></dfn>
attributes</h5>

Expand Down Expand Up @@ -14424,33 +14437,36 @@ and so Hammond ordered the iris to be opened.&lt;/p&gt;</pre>
<code><a href=#the-abbr-element>abbr</a></code> element. This paragraph <a href=#defining-term title="defining
term">defines the term</a> "Web Hypertext Application Technology
Working Group".</p>
<pre>&lt;p&gt;The &lt;dfn id=whatwg&gt;&lt;abbr title="Web Hypertext Application
Technology Working Group"&gt;WHATWG&lt;/abbr&gt;&lt;/dfn&gt; is a loose
unofficial collaboration of Web browser manufacturers and interested
parties who wish to develop new technologies designed to allow authors
to write and deploy Applications over the World Wide Web.&lt;/p&gt;</pre>
<pre>&lt;p&gt;The &lt;dfn id=whatwg&gt;&lt;abbr
title="Web Hypertext Application Technology Working Group"&gt;WHATWG&lt;/abbr&gt;&lt;/dfn&gt;
is a loose unofficial collaboration of Web browser manufacturers and
interested parties who wish to develop new technologies designed to
allow authors to write and deploy Applications over the World Wide
Web.&lt;/p&gt;</pre>
<p>An alternative way to write this would be:</p>
<pre>&lt;p&gt;The &lt;dfn id=whatwg&gt;Web Hypertext Application Technology
Working Group&lt;/dfn&gt; (&lt;abbr title="Web Hypertext Application
Technology Working Group"&gt;WHATWG&lt;/abbr&gt;) is a loose unofficial
collaboration of Web browser manufacturers and interested parties who
wish to develop new technologies designed to allow authors to write
and deploy Applications over the World Wide Web.&lt;/p&gt;</pre>
Working Group&lt;/dfn&gt; (&lt;abbr
title="Web Hypertext Application Technology Working Group"&gt;WHATWG&lt;/abbr&gt;)
is a loose unofficial collaboration of Web browser manufacturers and
interested parties who wish to develop new technologies designed to
allow authors to write and deploy Applications over the World Wide
Web.&lt;/p&gt;</pre>
</div>

<div class=example>
<p>This paragraph has two abbreviations. Notice how only one is
defined; the other, with no expansion associated with it, does not
use the <code><a href=#the-abbr-element>abbr</a></code> element.</p>
<pre>&lt;p&gt;The &lt;abbr title="Web Hypertext Application Technology Working
Group"&gt;WHATWG&lt;/abbr&gt; started working on HTML5 in 2004.&lt;/p&gt;</pre>
<pre>&lt;p&gt;The
&lt;abbr title="Web Hypertext Application Technology Working Group"&gt;WHATWG&lt;/abbr&gt;
started working on HTML5 in 2004.&lt;/p&gt;</pre>
</div>

<div class=example>
<p>This paragraph links an abbreviation to its definition.</p>
<pre>&lt;p&gt;The &lt;a href="#whatwg"&gt;&lt;abbr title="Web Hypertext Application
Technology Working Group"&gt;WHATWG&lt;/abbr&gt;&lt;/a&gt; community does not
have much representation from Asia.&lt;/p&gt;</pre>
<pre>&lt;p&gt;The &lt;a href="#whatwg"&gt;&lt;abbr
title="Web Hypertext Application Technology Working Group"&gt;WHATWG&lt;/abbr&gt;&lt;/a&gt;
community does not have much representation from Asia.&lt;/p&gt;</pre>
</div>

<div class=example>
Expand Down
47 changes: 32 additions & 15 deletions source
Expand Up @@ -8042,6 +8042,19 @@ interface <dfn>HTMLDocument</dfn> {
multiple lines. Each U+000A LINE FEED (LF) character represents a
line break.</p>

<div class="example">

<p>Caution is advised with respect to the use of newlines in <code
title="attr-title">title</code> attributes.</p>

<p>For instance, the following snippet actually defines an
abbreviation's expansion <em>with a line break in it</em>:</p>

<pre class="bad">&lt;p>My logs show that there was some interest in &lt;abbr title="Hypertext
Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre>

</div>

<p>Some elements, such as <code>link</code>, <code>abbr</code>, and
<code>input</code>, define additional semantics for the <code
title="attr-title">title</code> attribute beyond the semantics
Expand All @@ -8058,6 +8071,7 @@ interface <dfn>HTMLDocument</dfn> {
</div>



<h5>The <dfn title="attr-lang"><code>lang</code></dfn> and <dfn
title="attr-xml-lang"><code>xml:lang</code></dfn>
attributes</h5>
Expand Down Expand Up @@ -15442,33 +15456,36 @@ and so Hammond ordered the iris to be opened.&lt;/p></pre>
<code>abbr</code> element. This paragraph <span title="defining
term">defines the term</span> "Web Hypertext Application Technology
Working Group".</p>
<pre>&lt;p>The &lt;dfn id=whatwg>&lt;abbr title="Web Hypertext Application
Technology Working Group">WHATWG&lt;/abbr>&lt;/dfn> is a loose
unofficial collaboration of Web browser manufacturers and interested
parties who wish to develop new technologies designed to allow authors
to write and deploy Applications over the World Wide Web.&lt;/p></pre>
<pre>&lt;p>The &lt;dfn id=whatwg>&lt;abbr
title="Web Hypertext Application Technology Working Group">WHATWG&lt;/abbr>&lt;/dfn>
is a loose unofficial collaboration of Web browser manufacturers and
interested parties who wish to develop new technologies designed to
allow authors to write and deploy Applications over the World Wide
Web.&lt;/p></pre>
<p>An alternative way to write this would be:</p>
<pre>&lt;p>The &lt;dfn id=whatwg>Web Hypertext Application Technology
Working Group&lt;/dfn> (&lt;abbr title="Web Hypertext Application
Technology Working Group">WHATWG&lt;/abbr>) is a loose unofficial
collaboration of Web browser manufacturers and interested parties who
wish to develop new technologies designed to allow authors to write
and deploy Applications over the World Wide Web.&lt;/p></pre>
Working Group&lt;/dfn> (&lt;abbr
title="Web Hypertext Application Technology Working Group">WHATWG&lt;/abbr>)
is a loose unofficial collaboration of Web browser manufacturers and
interested parties who wish to develop new technologies designed to
allow authors to write and deploy Applications over the World Wide
Web.&lt;/p></pre>
</div>

<div class="example">
<p>This paragraph has two abbreviations. Notice how only one is
defined; the other, with no expansion associated with it, does not
use the <code>abbr</code> element.</p>
<pre>&lt;p>The &lt;abbr title="Web Hypertext Application Technology Working
Group">WHATWG&lt;/abbr> started working on HTML5 in 2004.&lt;/p></pre>
<pre>&lt;p>The
&lt;abbr title="Web Hypertext Application Technology Working Group">WHATWG&lt;/abbr>
started working on HTML5 in 2004.&lt;/p></pre>
</div>

<div class="example">
<p>This paragraph links an abbreviation to its definition.</p>
<pre>&lt;p>The &lt;a href="#whatwg">&lt;abbr title="Web Hypertext Application
Technology Working Group">WHATWG&lt;/abbr>&lt;/a> community does not
have much representation from Asia.&lt;/p></pre>
<pre>&lt;p>The &lt;a href="#whatwg">&lt;abbr
title="Web Hypertext Application Technology Working Group">WHATWG&lt;/abbr>&lt;/a>
community does not have much representation from Asia.&lt;/p></pre>
</div>

<div class="example">
Expand Down

0 comments on commit 45e6009

Please sign in to comment.