Based on MDN documentation, using center tag to centering element no longer recommended. This tag has been deprecated in HTML 4.

Centering item with <div align="center"> is also not recommended. Based on MDN documentation, the align attribute is obsolete.

So, if you want to center Instagram embed please avoid using center tag or <div align="center">, use CSS flexbox instead.

CSS to Center Element

  .ig-container {
    display: flex;
    justify-content: center;


  <div class="ig-container">
    <!-- You Instagram Embed goes here -->


Before centering Instagram Embed

After centering Instagram Embed