title: Centering table in the middle of div, vertically and horizontally
body: <p>How can I center a table inside a div, like this:</p>
  
  <p><img src="https://i.stack.imgur.com/2TiGx.png" alt="enter image description here"></p>
  
  <p>I have tried several methods, but none of them worked. Here is one of them.</p>
  
  <pre><code>&lt;div style="width: 500px; height: 200px; border: 1px solid black; vertical-align: middle; text-align: center;"&gt;
      &lt;table style="border: 1px solid black;"&gt;
          &lt;tr&gt;
              &lt;td&gt;testing&lt;/td&gt;
              &lt;td&gt;testing&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Can it be accomplished, if so, how?</p>