html img in the middle of the line code example Example: center an image .someclass { display: block; margin-left: auto; margin-right: auto; }