ping chaddy

R

Roy A.

Explain then why it is the validator at w3 never gives any errors when
there is an image?

<img src="abc.jpg" alt="">

Valid coding. No height, no width.

http://oldies.1littleworld.com/index2.html

<http://validator.w3.org/check?uri=http://oldies.1littleworld.co...>

No errors.

<!ATTLIST IMG
%attrs; -- %coreattrs, %i18n, %events
--
src %URI; #REQUIRED -- URI of image to embed --
alt %Text; #REQUIRED -- short description --
longdesc %URI; #IMPLIED -- link to long description
(complements alt) --
name CDATA #IMPLIED -- name of image for scripting
--
height %Length; #IMPLIED -- override height --
width %Length; #IMPLIED -- override width --
usemap %URI; #IMPLIED -- use client-side image map --
ismap (ismap) #IMPLIED -- use server-side image map --

Only the src and the alt attribute is required. Height and width is
known as soon as the image is loaded.

http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG
 
R

richard

<!ATTLIST IMG
%attrs; -- %coreattrs, %i18n, %events
--
src %URI; #REQUIRED -- URI of image to embed --
alt %Text; #REQUIRED -- short description --
longdesc %URI; #IMPLIED -- link to long description
(complements alt) --
name CDATA #IMPLIED -- name of image for scripting


Precisely. Yet there are the so called experts around here who insist
one MUST absolutely include the parameters.

The only reason they are doing it is because they can't find fault
with anything else to bitch about.

The way I see it, if it works, validates, looks halfway decent, screw
these pathetic experts.
 
B

Blinky the Shark

richard said:
Precisely. Yet there are the so called experts around here who insist
one MUST absolutely include the parameters.

The only reason they are doing it is because they can't find fault
with anything else to bitch about.

The way I see it, if it works, validates, looks halfway decent, screw
these pathetic experts.

In at least some browsers, the page will render better if the dimensions
are included. That's not about validation and that's not about experts;
that's about making visiting the page a better experience.
 
M

Mark A. Boyd

(Specs after "name" re-inserted from Roy's post)

richard posted in alt.html:
Precisely. Yet there are the so called experts around here who insist
one MUST absolutely include the parameters.

If you're referring to your recent "pet project done!" thread, nobody in that
entire thread said they are required. Even Chaddy's flame didn't imply
that. Not sure how you came to that conclusion.
The only reason they are doing it is because they can't find fault
with anything else to bitch about.

Still an average day, richard?
The way I see it, if it works, validates, looks halfway decent, screw
these pathetic experts.

Create your site any way you want to.

If you post the URL in alt.html, you might expect to get some constructive
criticism. What would be the point otherwise? I know I wouldn't post a URL
here expecting to get a bunch of Flickr "cool", "great site", "brilliant"
responses.

If the experts point things out that you don't like or agree with, it doesn't
really make them pathetic, does it?
 
J

Jukka K. Korpela

richard said:
Explain then why it is the validator at w3 never gives any errors when
there is an image?

Sense the question does not make. Neither does your Subject line, or your
From line. So please keep using that From line until you have a clue. Thank
you.
 
S

Stanimir Stamenkov

Fri, 22 Aug 2008 22:58:14 -0700, /richard/:
Precisely. Yet there are the so called experts around here who insist
one MUST absolutely include the parameters.

Knowing the dimensions of an image before it is requested would
speed the layout in means it won't block the progressive rendering
until the image gets requested and its dimensions get found, but
that's generally true only for inline images. The block boxes
following the one containing the image can still be laid out without
waiting for the image to get loaded. So:

<p class="figure"><img alt="..." src="..."></p>

won't cause the page to "load" slower. It will just cause the
following block boxes to be shifted (after the image gets requested)
vertically without being re-flowed. To optimize/prevent the visual
effect of shifting during the progressive rendering you could hint
the rendering engine about the dimensions of an image through a
style sheet, e.g.:

img[alt="..."] { width: 100px; height: 200px; }
img.icon { width: 40px; height: 40px; }
img[src="..."] { width: 300px; height: 150px; }

IE 6 does not understand CSS attribute selectors so one can't match
IMG elements on the 'alt' or 'src' attribute and adding a 'class' or
'id' attribute on every image is not a viable option. For this
browser I just choose to not optimize this, but I don't pollute my
markup with 'width' and 'height' attributes on IMG elements.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top