blob: cf2e39214a22f68a920d6b09e2a451e4716c9063 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>The dir attribute: ltr context, rtl table</title>
<link rel='author' title='HTML5 bidi test WG' href='mailto:public-i18n-bidi@w3.org'>
<link rel='help' href='https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute'>
<link rel="match" href="reference/the-dir-attribute-003-ref.html">
<meta name="assert" content="[Exploratory] When dir='rtl' is added to a table in a ltr context, (a) directional runs in a table are ordered right-to-left, (b) columns run right-to-left, (c) text is right-aligned within cells, and (d) the table is left-aligned on the page.">
<style type='text/css'>
.test, .ref { width: 90%; margin: 0 4%; font-size: 2em; position: absolute; top: 0; }
.ref { color: red; z-index: -100; }
td { border: 1px dotted #ccc; } .ref table { align: right; } .ref td { text-align: right; }
</style>
</head>
<body>
<p class="instructions" dir="ltr">Test passes if you see no red characters.</p>
<div style="position: relative">
<div class="test">
<table dir="rtl">
<tr><td>1</td><td>2</td><td>3</td></tr>
<tr><td>مكتب W3C הישראלי</td><td>مكتب W3C הישראלי</td><td>مكتب W3C הישראלי</td></tr>
</table>
</div>
<div class="ref" style="text-align:right;">
<table>
<tr><td>3</td><td>2</td><td>1</td></tr>
<tr><td>&#x202B;مكتب W3C הישראלי&#x202C;</td><td>&#x202B;مكتب W3C הישראלי&#x202C;</td><td>&#x202B;مكتب W3C הישראלי&#x202C;</td></tr>
</table>
</div>
</div>
</body>
</html>