<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <style>
      html {
        height: 100%;
        background: #eee;
      }
      body {
        margin: 0 auto;
        padding: 1em;
        box-sizing: border-box;
        width: 500px;
        height: 100%;
        background: white;
        font-family: Arial;
        font-size: 15px;
        line-height: 40px;
      }
      p span {
        padding: 5px 0;
        margin: 0 5px;
        border: 5px solid #eee;
      }
    </style>
  </head>
  <body>
    <h1>Lorem Ipsum</h1>
    <h2>Lorem ipsum <em>dolor sit amet</em></h2>
    <p><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, nisl eget semper maximus, dui tellus tempor leo, at pharetra eros tortor sed odio. Nullam sagittis ex nec mi sagittis pulvinar. Pellentesque dapibus feugiat fermentum. Curabitur lacinia quis enim et tristique. Aliquam in semper massa. In ac vulputate nunc, at rutrum neque. Fusce condimentum, tellus quis placerat imperdiet, dolor tortor mattis erat, nec luctus magna diam pharetra mauris.</span></p>
    <div dir="rtl">
      <span><span></span>some ltr text in an rtl container</span>
    </div>
  </body>
</html>
