+ 7
How can we align an image to center in html document
Can't we simply do it like <img align="center" src="photo.jpg" alt="">
3 odpowiedzi
+ 11
If you are feeling hard to use css that their another method also
use it --- example
<p align="center">
<img src=" photo.jpg" >
</p>
if you use align="center" in img attribute it will not work so use above example
+ 5
<style>
.img-container {
text-align: center;
}
</style>
<body>
<div class="img-container">
<img src="user.png" alt="Alladin">
</div>
</body>
I hope you get it.
Thanks!
+ 3
You can simply add <center> </center> tag ,it will work.