W3C home > Mailing lists > Public > public-html-comments@w3.org > November 2011

Re: Image width specification in html5

From: Manuel Bieh <mailinglist@manuelbieh.de>
Date: Mon, 21 Nov 2011 12:18:39 +0100
Message-ID: <CAOCf0dwVNsJKJU5+gBJXBNDMRuSuvOG8Uc5oo2-jJ0JXmR9Xuw@mail.gmail.com>
To: public-html-comments@w3.org
Seen from an XML perspective: attributes contain meta information
about the element they're used on. So width and height should describe
the _actual_ width and height of the image file defined in the <img>
element's src attribut. That's markup. CSS is used for styling your
markup and thus you should use CSS' width and height properties to
define how big your image should be displayed in your document. That's
probably the reason the HTML width/height attributes are being ignored
when specifying a different size in CSS although width/height
attributes are "inline". By defining width=3D"75%" in your markup you
would give up the separation of content and layout information.
Received on Monday, 21 November 2011 17:53:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 21 November 2011 17:53:59 GMT