| <!DOCTYPE html> |
| <html lang="en" > |
| <head> |
| <meta charset="utf-8"/> |
| <title>The dir attribute: rtl context, ltr 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-004-ref.html"> |
| <meta name="assert" content="[Exploratory] When dir='ltr' is added to a table in a rtl context, (a) directional runs in the table are ordered left-to-right, (b) columns run left-to-right, (c) text is left-aligned within cells, and (d) the table is right-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: left; } |
| </style> |
| </head> |
| <body> |
| <p class="instructions">Test passes if you see no red characters.</p> |
| <div style="position: relative"> |
| <div class="test" dir="rtl"> |
| <table dir="ltr"> |
| <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"> |
| <table style="float:right;"> |
| <tr><td>1</td><td>2</td><td>3</td></tr> |
| <tr><td>مكتب W3C הישראלי</td><td>مكتب W3C הישראלי</td><td>مكتب W3C הישראלי</td></tr> |
| </table> |
| <br style="clear:both;"/> |
| </div> |
| </div> |
| </body> |
| </html> |