24 Jul
The W3C have released an FAQ for XHTML, and the 6th working draft of the new XHTML2 specification. [via Slashdot]
There’s not a lot of new stuff in the FAQ, mostly just answering criticisms and legacy questions about implementing XHTML, but one question was interesting: Is <img> being replaced by <object> in XHTML2?
.
No.
<img>is being replaced in XHTML2, but by something else (although you could use<object>if you wanted).The design of
<img>has many problems in HTML:
- It has no fallback possibilities, so that if you use an image of type PNG for instance, and the browser can’t handle that type, the only alternative is to use the
alttext. This fact has hampered the adoption of PNG images, which in many ways are better than GIF and JPG, since people have continued to use the lowest-common denominator format, to ensure that everyone can see the images.- The
alttext cannot be marked up, so that if it gets used, you just get the plain text.- It is possible to include a
longdesclink to a description of the image, to help people who cannot see, but it is seldom implemented.What XHTML2 does is say that all images are equivalent to some piece of content; it does this by allowing you to put a
srcattribute on any element at all. What this says is: if the image is available, and the browser can process it, use it, otherwise use the content of the element. For instance:
<p src="/map.png">Exit from the station, turn left, go straight on to <strong>High Street</strong>, and turn right</p>…
(The rest of the answer has to do with having fall-back images and using content negotiation.)
This sounds great, as long as user-agents support it (yes IE I’m looking at you). The ability to fall back images and provide marked-up alt text would mean a huge leap forward in design possibilities and usability options. It would also do away with the need for Fahrner Image Replacement techniques which have proved (while very useful) somewhat unreliable and semantically questionable.
The only problem that I can see (other than a question of browser implementation) is from a purely semantic point of view. Basically this is getting rid of explicitly stating "here is an image" with an <img> tag, it’s now saying "here is a block of markup that has an image sitting on top of it". It may just be me, but it just doesn’t seem quite right. It’s a little bit of a concept shift, so it may just take some getting used to.
One Response for "W3C releases XHTML FAQ & XHTML2 Working draft"
Nice site!
Leave a reply