| <!DOCTYPE html> |
| <html lang="en" > |
| <head> |
| <meta charset="utf-8"/> |
| <title>The dir attribute: dir=auto, inline auto direction</title> |
| <link rel='author' title='Richard Ishida' href='mailto:ishida@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-046-ref.html"> |
| <meta name="assert" content="When dir='auto', the direction is set according to the first strong character of the text. dir=auto is applied to an inline element here, in various base direction contexts."> |
| <style type='text/css'> |
| .test, .ref { width: 90%; margin: 0 4%; font-size: 2em; position: absolute; top: 0; } |
| .ref { color: red; z-index: -100; } |
| |
| </style> |
| </head> |
| <body> |
| <p class="instructions" dir="ltr">Test passes if you see no red characters.</p> |
| <!--<div class="comments"> |
| Key to entities used below: |
| א - The Hebrew letter Alef (strongly RTL). |
| ‭ - The LRO (left-to-right-override) formatting character. |
| ‬ - The PDF (pop directional formatting) formatting character; closes LRO. |
| </div>--> |
| <div style="position: relative"> |
| <div class="test"> |
| <div dir="rtl"> |
| א <span dir="auto">a!</span> א |
| </div> |
| <div dir="ltr"> |
| א <span dir="auto">a!</span> א |
| </div> |
| <div dir="ltr"> |
| a <span dir="auto">א!</span> a |
| </div> |
| <div dir="rtl"> |
| a <span dir="auto">א!</span> a |
| </div> |
| </div> |
| <div class="ref"> |
| <div dir="rtl"> |
| ‭א a! א‬ |
| </div> |
| <div dir="ltr"> |
| ‭א a! א‬ |
| </div> |
| <div dir="ltr"> |
| ‭a !א a‬ |
| </div> |
| <div dir="rtl"> |
| ‭a !א a‬ |
| </div> |
| </div> |
| </div> |
| </body> |
| </html> |