+ 2
How can I insert image in the centre in html?
I am trying to make album of some photos so please help me how to insert any image in the centre right and left in HTML.
4 ответов
+ 4
Hi SA FUN,
It completely depends on the layout of the rest of your page, but as a basic rule, you can change the image to display block and then set margin to 0 auto. So in your CSS:
img {
display: block;
margin: 0 auto;
}
+ 4
it worked thanks
+ 3
I tried <center>tag. Didn't worked.
+ 2
@Jaydeep Khatri the <center> tag is NOT supported in html5. It is best to use CSS.