- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 09 Nov 2010 02:14:21 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv32680 Modified Files: Overview.html Log Message: An example of dir=auto. Since I don't speak Arabic and am relying on Wikipedia, a close review by Arabic speakers would be even more welcome than usual. (whatwg r5673) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.4539 retrieving revision 1.4540 diff -u -d -r1.4539 -r1.4540 --- Overview.html 9 Nov 2010 00:58:06 -0000 1.4539 +++ Overview.html 9 Nov 2010 02:14:17 -0000 1.4540 @@ -8541,7 +8541,6 @@ </dd> - <dt>If the element is a <a href="#root-element">root element</a> and the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt> @@ -8584,7 +8583,47 @@ </div><p class="note">Authors are strongly encouraged to use the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> attribute to indicate text direction rather than using CSS, since that way their documents will continue to render correctly even in the absence of CSS (e.g. as interpreted - by search engines).<h5 id="classes"><span class="secno">3.2.3.6 </span>The <dfn title="attr-class"><code>class</code></dfn> attribute</h5><p>Every <a href="#html-elements" title="HTML elements">HTML element</a> may have a + by search engines).<div class="example"> + + <p>This markup fragment is of an IM conversation.</p> + + <pre><p dir=auto class="u1"><b><bdi>Student</bdi>:</b> How do you write "What's your name?" in Arabic?</p> +<p dir=auto class="u2"><b><bdi>Teacher</bdi>:</b> ما اسمك؟</p> +<p dir=auto class="u1"><b><bdi>Student</bdi>:</b> Thanks.</p> +<p dir=auto class="u2"><b><bdi>Teacher</bdi>:</b> That's written "شكرًا".</p> +<p dir=auto class="u2"><b><bdi>Teacher</bdi>:</b> Do you know how to write "Please"?</p> +<p dir=auto class="u1"><b><bdi>Student</bdi>:</b> "من فضلك", right?</p></pre> + +<!-- +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<style type="text/css"> + div { border: groove #FFFF99; padding: 0.25em; width: 22em; background: #FFFFEE; color: black; } + p { margin: 0.25em 0; font: 1em/1 InaiMathi; color: purple; } + .u1 { color: teal; } +</style> +<div> +<p dir=ltr class="u1"><b><bdi>Student</bdi>:</b> How do you write "What's your name?" in Arabic?</p> +<p dir=rtl class="u2"><b><bdi>Teacher</bdi>:</b> ما اسمك؟</p> +<p dir=ltr class="u1"><b><bdi>Student</bdi>:</b> Thanks.</p> +<p dir=ltr class="u2"><b><bdi>Teacher</bdi>:</b> That's written "شكرًا".</p> +<p dir=ltr class="u2"><b><bdi>Teacher</bdi>:</b> Do you know how to write "Please"?</p> +<p dir=rtl class="u1"><b><bdi>Student</bdi>:</b> "من فضلك", right?</p> +--> + + <p>Given a suitable style sheet and the default alignment styles + for the <code><a href="#the-p-element">p</a></code> element, namely to align the text to the + <i>start edge</i> of the paragraph, the resulting rendering could + be as follows:</p> + + <p><img alt="Each paragraph rendered as a separate block, with the paragraphs left-aligned except the second paragraph and the last one, which would be right aligned, with the usernames ('Student' and 'Teacher' in this example) flush right, with a colon to their left, and the text first to the left of that." src="http://dev.w3.org/html5/spec/images/im.png"></p> + + <p>As noted earlier, the <code title="attr-dir-auto"><a href="#attr-dir-auto">auto</a></code> + value is not a panacea. The final paragraph in this example is + misinterpreted as being right-to-left text, since it begins with an + Arabic character, which causes the "right?" to be to the left of + the Arabic text.</p> + + </div><h5 id="classes"><span class="secno">3.2.3.6 </span>The <dfn title="attr-class"><code>class</code></dfn> attribute</h5><p>Every <a href="#html-elements" title="HTML elements">HTML element</a> may have a <code title="attr-class"><a href="#classes">class</a></code> attribute specified.<p>The attribute, if specified, must have a value that is a <a href="#set-of-space-separated-tokens">set of space-separated tokens</a> representing the various classes that the element belongs to.<div class="impl">
Received on Tuesday, 9 November 2010 02:14:23 UTC