+ 2
How to align img to centre
7 ответов
+ 7
img { display: block; margin: 0 auto; }
or
<div style = "text-align: center">
<img src "...">
</div>
+ 6
<div align = "center">
<img src "...">
</div>
This is in pure HTML, works well but it's deprecated, so... use CSS instead. ;)
+ 5
There is a HTML <img> align Attribute but it aligns the image just according to the surrounding element!
but the HTML align attribute is not supported in HTML5 so you should use css for the alignment!
the best solution is to put it into a div tag like Maz already explained!
+ 4
@Akhil why do you think that HTML and JS really ends?
0
I want answer in html
0
tq
- 1
HTML ends...
CSS starts...
JS really ends ^^