W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

[whatwg] [HTML5] A content in <img> elements for ASCII art

From: Nikita Popov <privat@ni-po.com>
Date: Wed, 25 Nov 2009 15:56:16 +0100
Message-ID: <4B0D4590.7070901@ni-po.com>
I think the idea of replacing the alt-attribute by the content of img is 
very good. An image used as an <img> needs to be content-related an 
therefore you often could place a descriptive text into it. This would 
lead us to img being only a normal HTML-element with normal content, but 
the ability of specifying an image by "src".

On the problem of implementation:
<img src="borken_url.jpg" style="white-space:pre; 
font-family:monospace"><span style="white-space:pre; 
If the browser knows the syntax, it'll render correct, if not it'll 
render correct only in case broken_url.jpg is really broken. Otherwise 
the text would be underneath it. So you would need to position the span 
over the img.

I don't know whether it's worth the effort, but it would be a better 
syntax than alt, in my eyes.

Nikita Popov
Received on Wednesday, 25 November 2009 06:56:16 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC