0

Html images Alignment

how do I align the image to the Centre of the Page. P.s. : I'm a beginner

15th Aug 2017, 6:52 AM
Kapil Ananth
Kapil Ananth - avatar
2 Answers
+ 5
Use <div align = 'center' > <img src = 'img.jpg'> </div> Or you can also use - <p align = 'center' > <img src = 'abc.jpg'> </p> Both of them will align the image to Center.
15th Aug 2017, 7:37 AM
un1xx
un1xx - avatar
0
add this css class to the image .image { width:50%; margin: auto; display: block;} you can add any width to the image and you can use the same method to center divs :)
15th Aug 2017, 7:10 AM
Mashan Shaluka1
Mashan Shaluka1 - avatar