+ 1
Help me Why this image code doesn't aligned to the center of the page ?
Align image to the center of the page <img src='a.jpg' align="center">
7 Answers
+ 2
Koopa Scripter It mostly works for ascending compatibility and because html syntaxe is permissive, but it was retired from the specifications since html4, and it's strongly recommend to use css for presentation purposes...
Anyway, browsers vendors are not expected to implement it, and support may change at any time ^^
Mik in fact <img> has two required attributes: href and alt... the second is often omitted, but that's not valid too in htm5... at worst, better to set alt with an empty string (alt=""), even if that's not really an advised practice ;P
+ 1
You can do this instead:
<center>
<img src="a.jpg"/>
</center>
+ 1
<center> is not an html5 valid tag...
much advised to apply css style "text-align:center" to the container, creating a new one if necessary ^^
The container must be of type block...
+ 1
visph But it works
+ 1
It mean img tag does't have other attribut then src?
+ 1
Koopa Scripter yeh it work yr code but need to change other thing like width ... Color
0
thinks to much frds