+ 1
How to align an image?
I typed: <body> <img src="logo.png" align="center" border="1px" width="20%" alt=""> <h2 align="center"> The Title </h2> But the image didn't move from the corner to the center. I think it is because of header. When I type align="left" the image and header lie straightly. But the header move right a little. How can I fix this?
2 ответов
+ 2
style="align-content: center;" inside the tag should work
0
<p align="center">
<img src="logo.png" alt=""/>
<h2>The Title</h2>
</p>