Width and height attributes

Dear All,
 
Apologies if you've already received this message.  My first attempt to
send this didn't appear to get through and isn't in the archive.


Great work on the current draft!  I would however, like to suggest the
removal (or depreciation) 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 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" alt="" class="photo"/>
 
.... The CSS could then present the image as:
 
img.photo { width : 10cm; height : 6cm; }
 
.... 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 the resolution
of the monitor (regardless of whether it is 72dpi, 96dpi or 180dpi), in
the same way that text, specified in a point or absolute size, is
handled.
 
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 containing block or
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

Received on Wednesday, 30 January 2008 21:02:16 UTC