This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currnet HTML specification says that the width and height attributes on img, iframe, embed, object, video and input element are valid non-negative INTEGERS. https://www.w3.org/html/wg/drafts/html/master/semantics.html#attr-dim-width On the other hand, 'width' and 'height' CSS property corresponding to them are <number> which allows decimal point. https://www.w3.org/TR/CSS2/visudet.html#the-width-property I noticed it, when checking the HTML5 elements in SVG subtrees chapter of the SVG2 draft. It will cause confusion, since width and height attribute of SVG's graphics elements allows decimal point. https://svgwg.org/svg2-draft/embedded.html#HTMLElements Furthermore, I have noticed that webkit and blink handles the width and height attribute of html as decimal point values. See this test: http://svg2.mbsrv.net/devinfo/devstd/embedWH/ Please take into consideration that width and height of html attribute allow decimal point values.
Would you like to also file an issue about this at https://github.com/whatwg/html/issues ?
Posted; https://github.com/whatwg/html/issues/533 (In reply to Simon Pieters from comment #1) > Would you like to also file an issue about this at > https://github.com/whatwg/html/issues ?
Thank you!
HTML5.1 Bugzilla Bug Triage: Fixed The algorithm for image candidate string now covers floating-point numbers. ... 4. Zero or one of the following: A width descriptor, consisting of: a space character, a valid non-negative integer giving a number greater than zero representing the width descriptor value, and a U+0077 LATIN SMALL LETTER W character. A pixel density descriptor, consisting of: a space character, a valid floating-point number giving a number greater than zero representing the pixel density descriptor value, and a U+0078 LATIN SMALL LETTER X character. ...