Re: XHTML Problem With Netscape 6

by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>

 Date:  Tue, 26 Feb 2002 14:02:19 -0800
 To:  "Mike Taylor" <lonewolf(at)one.net>
 Cc:  <gscott(at)tds.net>, <hwg-techniques(at)mail.hwg.org>
 References:  one
  todo: View Thread, Original
Mike,

On the W3C site, no, I can't pinpoint it. I'm going off what the W3C's
validator and Homesite's validator told me when I ran my own code through
them... :-/ I will have to admit that the W3C's site is a wealth of
information, but the indexing of the site leaves a lot to be desired...

<leave for reference checkup />

Okay... I spent some time poking around (a LOT of time, I might add), and
here's what I found regarding the border="0" and other IMG attributes:

http://www.w3.org/MarkUp/
XHTML 1.0 Strict - Use this when you want really clean structural mark-up,
free of any tags associated with layout. Use this together with W3C's
Cascading Style Sheet language (CSS) to get the font, color, and layout
effects you want.

XHTML 1.0 Transitional - Many people writing Web pages for the general
public to access might want to use this flavor of XHTML 1.0. The idea is to
take advantage of XHTML features including style sheets but nonetheless to
make small adjustments to your mark-up for the benefit of those viewing your
pages with older browsers which can't understand style sheets. These include
using BODY with bgcolor, text and link attributes.

XHTML 1.0 Frameset - Use this when you want to use HTML Frames to partition
the browser window into two or more frames.

My interpretation of the Strict definition is that everything should be in
CSS that is for display attributes, and since BORDER is a display attribute,
that's why. This site is so convoluted...! Sheesh... I found this in the
HTML4 description:

http://www.w3.org/TR/html4/struct/objects.html#edef-IMG
13.2 Including an image: the IMG element
<!-- To avoid problems with text-only UAs as well as
   to make image content understandable and navigable
   to users of non-visual UAs, you need to provide
   a description with ALT, and avoid server-side image maps -->
<!ELEMENT IMG - O EMPTY                -- Embedded image -->
<!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 --
  >

No mention of BORDER there, so I'm *guessing* in HTML 4 Strict it's
forbidden, too... I wish they had a lookup chart for XHTML, too... it would
certainly make my life easier (and others' lives, too, I'd imagine).

Now I'm confused... I know the validators scream "Bad! Bad! Bad! Naughty
programmer! Go sit in a corner!" if border="_" is in the IMG tag, but I
can't figure out why! Can anyone else point to the spec for why this is?

Kehvan

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: NORTON ANTI-VIRUS 2002 scanned this email prior to sending. It is free
:: of any known embedded or attached viruses, trojans, or internet worms.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


----- Original Message -----
From: "Mike Taylor" <lonewolf(at)one.net>
To: "Kehvan M. Zydhek" <kehvan(at)zydhek.net>
Cc: <gscott(at)tds.net>; <hwg-techniques(at)mail.hwg.org>
Sent: Tuesday, February 26, 2002 12:15
Subject: Re: XHTML Problem With Netscape 6


> On Tue, 26 Feb 2002, Kehvan M. Zydhek wrote:
>
> > Greg,
> >
> > First off, you can't validate to XHTML (at least not STRICT) with
border="0"
> > or vspace="0" in the image tags. Neither are valid attributes. You can
> > probably fix this rather simple problem by adding the following to your
CSS:
>
> Can you tell me where on w3c.org it specifically indicates you can't use
> these attributes for image tags?  I couldn't find any such reference,
> looking from the XHTML 1.0 main
> page. (http://www.w3.org/TR/2000/REC-xhtml1-20000126/)
>
> Thanks.
>
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA