Skip to content

Commit

Permalink
[] (1) New alt='' example.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1008 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 15, 2007
1 parent 4fe846d commit 9463026
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
29 changes: 29 additions & 0 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -12050,6 +12050,35 @@ Script Execution. Script Execution is linked to the DOM, and, using
document.write(), passes data to the Tokeniser."></strong>&lt;/p></pre>
</div>

<div class=example>
<p>Here's another example, showing a good solution and a bad solution to
the problem of including an image in a description.</p>

<p>First, here's the good solution. This sample shows how the
alternative text should just be what you would have put in the prose if
the image had never existed.</p>

<pre>&lt;!-- This is the correct way to do things. -->
&lt;p>
You are standing in an open field west of a house.
<strong>&lt;img src="house.jpeg" alt="The house is white, with a boarded front door."></strong>
There is a small mailbox here.
&lt;/p></pre>

<p>Second, here's the bad solution. In this incorrect way of doing
things, the alternative text is simply a description of the image,
instead of a textual replacement for the image. It's bad because when
the image isn't shown, the text doesn't flow as well as in the first
example.</p>

<pre>&lt;!-- <em>This is the wrong way to do things.</em> -->
&lt;p>
You are standing in an open field west of a house.
&lt;img src="house.jpeg" alt="A white house, with a boarded front door.">
There is a small mailbox here.
&lt;/p></pre>
</div>

<p>It is important to realise that the alternative text is a
<em>replacement</em> for the image, not a description of the image.</p>

Expand Down
32 changes: 32 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -10027,6 +10027,38 @@ document.write(), passes data to the Tokeniser."></strong>&lt;/p></pre>

</div>

<div class="example">

<p>Here's another example, showing a good solution and a bad
solution to the problem of including an image in a
description.</p>

<p>First, here's the good solution. This sample shows how the
alternative text should just be what you would have put in the
prose if the image had never existed.</p>

<pre>&lt;!-- This is the correct way to do things. -->
&lt;p>
You are standing in an open field west of a house.
<strong>&lt;img src="house.jpeg" alt="The house is white, with a boarded front door."></strong>
There is a small mailbox here.
&lt;/p></pre>

<p>Second, here's the bad solution. In this incorrect way of
doing things, the alternative text is simply a description of the
image, instead of a textual replacement for the image. It's bad
because when the image isn't shown, the text doesn't flow as well
as in the first example.</p>

<pre>&lt;!-- <em>This is the wrong way to do things.</em> -->
&lt;p>
You are standing in an open field west of a house.
&lt;img src="house.jpeg" alt="A white house, with a boarded front door.">
There is a small mailbox here.
&lt;/p></pre>

</div>

<p>It is important to realise that the alternative text is a
<em>replacement</em> for the image, not a description of the
image.</p>
Expand Down

0 comments on commit 9463026

Please sign in to comment.