title: How to align body of the webpage to center?
body: <p>I tried in my CSS such property like text-align: center, but it wasn't working. Then I tried to set left-margin and right-margin to auto but it is not working too. How else can I center all info of my webpage? Here's the code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta name="author" content="Yevhenii Zhdan"&gt;
          &lt;style type="text/css"&gt;
              body {
                  padding: 20px;  
              }
              h1, h2 {
                  font-weight: normal;
                  color: #0088dd;
                  margin: 0px;
                  text-align: center;
              }
              h1 {
                  background-image: url("images/bob.gif");
                  background-repeat: no-repeat;
                  text-indent: -9999px;
                  padding-bottom: 3%;
              }
              h2 {
                  padding: 10px;
                  width: 12em;
                  font-family: "Gill Sans", Arial, sans-serif;
                  font-size: 90%;
                  text-transform: uppercase;
                  letter-spacing: 0.2em;
                  border: 2px solid #0088dd;
                  border-right: none; 
                  border-bottom: none;
              }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;YZhdan&lt;/h1&gt;
          &lt;h2&gt;&lt;b&gt;How to find me:&lt;/b&gt;&lt;/h2&gt;
              &lt;br /&gt;
          &lt;iframe 
          width="450" 
          height="350"
          src="https://www.google.com.ua/maps?q=...&amp;amp;output=embed"&gt;
          &lt;/iframe&gt;
          &lt;p&gt;&lt;b&gt;&amp;#169; Yevhenii Zhdan&lt;/b&gt;&lt;/p&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    padding: 20px;
  }
  h1,
  h2 {
    font-weight: normal;
    color: #0088dd;
    margin: 0px;
    text-align: center;
  }
  h1 {
    background-image: url("images/bob.gif");
    background-repeat: no-repeat;
    text-indent: -9999px;
    padding-bottom: 3%;
  }
  h2 {
    padding: 10px;
    width: 12em;
    font-family: "Gill Sans", Arial, sans-serif;
    font-size: 90%;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 2px solid #0088dd;
    border-right: none;
    border-bottom: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;YZhdan&lt;/h1&gt;
  &lt;h2&gt;&lt;b&gt;How to find me:&lt;/b&gt;&lt;/h2&gt;
  &lt;br /&gt;
  &lt;iframe width="450" height="350" src="https://www.google.com.ua/maps?q=...&amp;amp;output=embed"&gt;
  &lt;/iframe&gt;
  &lt;p&gt;&lt;b&gt;&amp;#169; Yevhenii Zhdan&lt;/b&gt;
  &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>