How to center an image using text-align center in HTML?

Is it possible to center image using text-align:center; style?


  • It is not supported by W3C.

    Use the following way: {
        display: block;
        margin-left: auto;
        margin-right: auto;
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion