On Jul 26, 2011, at 7:08 AM, Walter Ian Kaye wrote:

> At 03:26 p -0600 07/24/2011, LuKreme didst inscribe upon an electronic 
> papyrus:
> 
>> On Jul 24, 2011, at 15:15, echo <goo...@echozone.com> wrote:
>>> 
>>>> (c) no size tags once a file is selected;
>>> 
>>> width + height attributes are not required on image tags. Perhaps
>>> omitted to work with some responsive design techniques for images.
>> 
>> Not REQUIRED, but strongly recommended. If someone coded a page without 
>> width+height I would make them fix it.
> 
> When did it become optional? I thought it was required since, like, 3.2 or 
> something. BTW, there was an old trick whereby if you gave only one 
> dimension, say WIDTH=96, the browser would calculate the other to match the 
> aspect ratio for you. Although now I put my images sizes in their filenames 
> so my Perl scripts (and my eyes) can instantly parse it out 
> (foo-bar-WWWxHHH.jpeg).

In some ways, it has always been optional. In the bad old days, we made it 
"mandatory" primarily because it caused the browsers to load the images much 
faster. Under HTML5, you will find that the size is omitted unless you want to 
display the image at a different size than the actual image size. They even 
have other attributes to indicate usage of the actual size of the image called 
naturalWidth and naturalHeight. This goes back to the whole html5 concept of 
KISS, be specific only when you need to be and be specific when you need to 
convey information.

> 
>> >> (d) apparently enforced alt text, inserted even if I delete it.
>>> 
>>> I also would prefer deleting would result in an empty alt attribute,
>>> but I did find that if you enter a space, that works to make it " "
>> 
>> All text is REQUIRED on all images. Omitting it or setting it to a space is 
>> an error, pure and simple.
> 
> How do you deal with purely decorative images? Their ALTs should not have 
> "noise" in them. Old versions of Lynx would annoyingly put "[IMAGE]" when the 
> ALT was set to "" but not when set to " " (so I used to do ALT=" " a lot); 
> newer versions of the browser became smarter about ALT="", thankfully.
> 

Under HTML5 again, alt="" is actually required for images that don't actually 
appear on the page as well as size dimensions of height=0 width=0 so allowing 
for alt="" should be possible.

http://developers.whatwg.org/embedded-content-1.html#the-img-element

NOTE: looking at some HTML5 will drive some people absolutely batty, especially 
those that are adamant about XHTML syntax so don't even go there until you are 
ready to throw out a lot of those XML rules.

> -boo
> Lynx trick:
> SPAN.hidden {display:none}
> <SPAN CLASS=hidden> </SPAN> <!-- make up for lack of CSS padding -->
> 
> -- 
> You received this message because you are subscribed to the "BBEdit Talk" 
> discussion group on Google Groups.
> To post to this group, send email to bbedit@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+unsubscr...@googlegroups.com
> For more options, visit this group at
> <http://groups.google.com/group/bbedit?hl=en>
> If you have a feature request or would like to report a problem, please email 
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to