title: Why isn't my text-align property applying to my span?
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Title of the document&lt;/title&gt;
      &lt;style&gt;
      .right {
        text-align: right;
      }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
      &lt;span class=&quot;right&quot;&gt;test&lt;/span&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I want 'test' to be displayed at right, but it didn't work. If I change span to div, it works. Why is that? I want  span, but not div. In the following example, I want 'name'  to be displayed at the right of the page, but at the same line as 'age'. But the 'span' tag doesn't do the job.</p>
  <pre><code>&lt;span&gt;age&lt;/span&gt;  &lt;span class=&quot;right&quot;&gt;name&lt;/span&gt;
  </code></pre>