I’m a bit confused by the odd behavior of the width attribute for an ‘img’ HTML tag. For example, I have the following three lines of code:
This seems odd but the width
attribute… doesn’t seem to be working! For example, on this page, I have the following three lines:
<img src = "/_media/logos/pdf.png", width = "15", height = "200">
<img src = "/_media/logos/pdf.png", width = "200", height = "200">
<img src = "/_media/logos/pdf.png", height = "200">
All three render the same size (on this page here) (with a height of 200px
, but what appears to be the maximum width). Here’s a screenshot of it:
Any idea what is going on here? Here is the source for the site.