W3C home > Mailing lists > Public > public-html-comments@w3.org > January 2008

Remove width and height attributes from specification

From: David Bailey <d.bailey@bathspa.ac.uk>
Date: Tue, 29 Jan 2008 16:26:55 -0000
Message-ID: <0626D3385D1E9F4BB842945568ABBC4B064E45@npwin-exchstaf1.bathspa.ac.uk>
To: <public-html-comments@w3.org>
Dear All,
 
Great work on the current draft!
 
I would however, like to suggest the removal of all width and height
attributes from the HTML 5 specification, applying to all elements that
use them, such as <img>, <embed>, <object>, <video> etc.
 
The width and height attributes are purely presentation related, and go
against the ethos of separating presentation style from semantic
content.  If width and height need to be applied to an element, then the
id or class attributes can be used as a hook for the CSS.
 
This also allows for HTML to become resolution independent.  For
example, an author could create an image 100cm x 50cm at 300dpi.  The
image would be inserted into the page using just:
 
<img src="filename.jpg" type="image/jpeg" class="photo"/>
 
.... The CSS would then present the image as:
 
img.photo { width : 10cm; height : 5cm; }
 
.... or if aspect ratio is to be maintained:
 
img.photo { width : 10cm; height : auto; }
 
The user-agent would handle scaling-to-fit the image to resolution of
the monitor (regardless of whether it is 72dpi, 96dpi or 180dpi).
 
This method gives the advantage that should the user wish to zoom into
the page to see greater image detail (some user-agents today already
allow zooming), they will be able to.  Likewise, if the page is printed,
the user-agent could print a higher resolution version of the image
without having to download or replace the image with another one from
the server.
 
Should no width of height be specified within the CSS, the user-agent
could fall back to presenting the image using the values embedded within
the media file itself.  If no values are supplied in the media file, the
image is rendered to fill the width of the user-agent's window.
 
I look forward to reading your comments.
 
Yours faithfully,
 

David Bailey,
Bath Spa University - Web Manager.

--
Information Services,
Bath Spa University,
Newton Park Campus,
Newton Saint Loe,
Bath, BA2 9BN, UK.

E: d.bailey@bathspa.ac.uk [personal]
E: webmaster@bathspa.ac.uk [work]
W: www.bathspa.ac.uk <http://www.bathspa.ac.uk/> 

 
Received on Wednesday, 30 January 2008 21:05:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:13:58 GMT