title: how do I align an image to center?
body: <p>I'm doing a simple test website to practice html. These are the image align variants I've tried that haven't worked:</p>
  
  <pre><code> &lt;style type="text/css"&gt;
        img {
        image-align: center;
        border: 2px dashed gray;
        height: 200px;
        width:  140px;
  
        }
   &lt;/style&gt;
  </code></pre>
  
  <hr>
  
  <pre><code> &lt;img src="images/htmlphoto2.jpg" alt="profile pic of man wearing tie" align="middle"/&gt;
  </code></pre>
  
  <hr>
  
  <pre><code> &lt;style type="text\css"&gt;
       img {
         margin-right: auto;
         margin-left: auto;
       }
  </code></pre>
  
  <h2>     </h2>
  
  <pre><code>  &lt;style type="text\css"&gt; 
       img {
         display: block;
         margin: 0 auto;
       }
    &lt;/style&gt;
  </code></pre>
  
  <hr>
  
  <p>full code: I'm using a combination of internal style sheet and inline styling for practice.</p>
  
  <pre><code> &lt;!-- autobiobrevio --&gt;
   &lt;!-- 8/21/14 11:00 - 11:50 Structure completed --&gt;
   &lt;!--8/23/14 10:00 pm - Alignment --&gt;
  
   &lt;!DOCTYPE html&gt;
  
   &lt;html&gt;
   &lt;head&gt;
   &lt;meta charset="utf-8" /&gt;
   &lt;title&gt;biosite&lt;/title&gt;
      &lt;style type="text/css"&gt;
          h1  {
            text-align: center;
          }
  
         img {
            image-align: center;
            border: 2px dashed gray;
            height: 200px;
            width:  140px;
         }
  
      &lt;/style&gt;
  
   &lt;/head&gt;
  
   &lt;body&gt;
  
   &lt;h1&gt; Steve's Autobiobrevio &lt;/h1&gt;
  
  &lt;img src="images/htmlphoto2.jpg" alt="profile pic of guy wearing tie" /&gt;
  &lt;br&gt;
  &lt;br&gt;
  
    &lt;table&gt;
     &lt;tr&gt;
       &lt;td&gt;
         &lt;ul&gt; &lt;span style="font-family: Impact"&gt; De moi &lt;/span&gt;
          &lt;li&gt; Born October 1972 &lt;/li&gt;
          &lt;li&gt; CT &lt;/li&gt;
          &lt;li&gt; blah blah blah &lt;/li&gt;
         &lt;/ul&gt;
      &lt;/td&gt;
  
       &lt;td&gt;
         &lt;ul&gt; &lt;span style="font-family: Impact"&gt; Hobbies &lt;/span&gt;  
          &lt;li&gt; Guitar &lt;/li&gt;
          &lt;li&gt; HTML &lt;/li&gt;
          &lt;li&gt; Hiking &lt;/li&gt;
         &lt;/ul&gt;
       &lt;/td&gt;
  
      &lt;td&gt;
        &lt;ul&gt;  &lt;span style="font-family: Impact"&gt; Fav Guitarists &lt;/span&gt;
         &lt;li&gt; David Gilmour &lt;/li&gt;
         &lt;li&gt; Muddy Waters &lt;/li&gt;
         &lt;li&gt; Dave Navarro &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
   &lt;/table&gt;
  
    &lt;div style="width: 800px; height: 100px; background-color: red" &lt;/div&gt;
  
  
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>Thank you.</p>