It is Legal to use this code:
<img src="...(here image)...." width="50px" height="50px" />
Or I need to use:
<img src="...(here image)..." style="width: 50px; height: 50px;" />
First use is recommended as hints for the browser's rendering, second one works.
In the first form you must not add 'px'.
http://www.w3.org/TR/html5/embedded-content-0.html#dimension-attributes
2.1m questions
2.1m answers
60 comments
57.0k users