Validating

K

Kris

Here are two validation errors that I have questions about:

Line 12 , column 14 :there is no attribute "BGCOLOR"
<body bgcolor="#FFFFFF">
Line 15 , column 46 :there is no attribute "BORDER"
....index.html"><img class="logo" border="0" src="logoS.gif"

I added border and bgcolor into these places in order to fix errors with how
netscape 4.8 mac reads the site. If I take them out to meet the validation
then the site will look shittier in older browsers. What are the
consequenses of leaving them in there? Both attributes are set to the same
value using CSS properties in the style sheet. The page seems to be loading
fine in Safari and NS 7 win.

Thanks in advance.

Kris
 
D

DU

Kris said:
Here are two validation errors that I have questions about:

Line 12 , column 14 :there is no attribute "BGCOLOR"
<body bgcolor="#FFFFFF">
Line 15 , column 46 :there is no attribute "BORDER"
...index.html"><img class="logo" border="0" src="logoS.gif"

I added border and bgcolor into these places in order to fix errors with how
netscape 4.8 mac reads the site. If I take them out to meet the validation
then the site will look shittier in older browsers. What are the
consequenses of leaving them in there? Both attributes are set to the same
value using CSS properties in the style sheet. The page seems to be loading
fine in Safari and NS 7 win.

Thanks in advance.

Kris

Add this in your <head> part:

<style type="text/css">
body {background:white; color:black;}
</style>

Regarding border="0" in the <img> element, this <img> is probably
embedded in an anchor and you want to remove the blue border around that
image. I personally do the opposite: I make sure there will be a blue
border around clickable images so that the users know thanks to that
blue border that they can click on the image.

Finally, remember that NS 4.x was first conceived, designed and
developped more than 7 years ago: its first version was released in dec.
1996. Most people are uninstalling NS 4.x and installing NS 7.1 or
Mozilla 1.4+ and they are not reverting back. There are now more people
using NS 7.x than using NS 4.x.
In your case, what's important is that content is still accessible in
old browsers and non-compliant browsers. That's what WAI recommends to
strive to do for old/non-compliant browsers and that's how basically you
can measure/assess a webpage's accessibility.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
M

Micah Cowan

Kris said:
Here are two validation errors that I have questions about:

Line 12 , column 14 :there is no attribute "BGCOLOR"
<body bgcolor="#FFFFFF">
Line 15 , column 46 :there is no attribute "BORDER"
...index.html"><img class="logo" border="0" src="logoS.gif"

I added border and bgcolor into these places in order to fix errors with how
netscape 4.8 mac reads the site. If I take them out to meet the validation
then the site will look shittier in older browsers. What are the
consequenses of leaving them in there? Both attributes are set to the same
value using CSS properties in the style sheet. The page seems to be loading
fine in Safari and NS 7 win.

If this is really an issue for you, then switch to the
"Transitional" doctype (the exact public identifier will depend
on whether you're using HTML or XHTML; go to w3c.org and look it
up in the spec yourself if need be). This officially defines the
bgcolor attribute for body, and border for img.

I don't know what validator you are using, and whether this
solution will actually fix your problem; however, it will make it
correct regardless of what the validator says. Personally, I
don't use an HTML validator; I use a validating XML Editor
(modified PSGML mode for GNU Emacs...)

HTH,
Micah
 
K

Kris

Add this in your <head> part:

<style type="text/css">
body {background:white; color:black;}
</style>

Regarding border="0" in the <img> element, this <img> is probably
embedded in an anchor and you want to remove the blue border around that
image. I personally do the opposite: I make sure there will be a blue
border around clickable images so that the users know thanks to that
blue border that they can click on the image.

Finally, remember that NS 4.x was first conceived, designed and
developped more than 7 years ago: its first version was released in dec.
1996. Most people are uninstalling NS 4.x and installing NS 7.1 or
Mozilla 1.4+ and they are not reverting back. There are now more people
using NS 7.x than using NS 4.x.
In your case, what's important is that content is still accessible in
old browsers and non-compliant browsers. That's what WAI recommends to
strive to do for old/non-compliant browsers and that's how basically you
can measure/assess a webpage's accessibility.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html

DU,

Will adding a style section to my header really fix the page in NS 4.8? If
it does then that seems to indicate that the problem in NS 4.8 is no support
for external style sheets, but it seems like some of my other css properties
from the external style sheets are working.

I agree about the image. A blue border would be a good idea to indicate
that it's a link. However, the image I'm using is a gif with transparency.
The actual image content is not rectangular. When the default border came
up it looked hideous (probably because it was too thick also), so I just
yanked it off in css, and then again later with the html border attribute
for NS 4.8. Do you know a way to make the border actually fit the image
content, or perhaps another simple way to indicate that it's a link without
having the nasty rectangular border? Again, what's the problem with just
leaving my page non-validating?

Your comment about content being the only significant thing with older
browsers would normally be true, but this will be a commercial site.
Appearance matters for all customers, unfortunately. Obviously the site
can't look great for all users. There are some errors in NS 4.8 that I just
can't fix without destroying the way the page looks in modern browsers.

That brings me to another question. Is there a way to see how my page is
going to look in all the pc versions of IE without actually installing them
all on a pc? So far I've been testing NS 4.8, Safari 1.0v85.5 and IE 5.2 on
the mac. On the PC I've been testing NS 7, and trying to test IE 6 but it
keeps bombing. Are there any other browsers I should be testing? Do you
know of any place that keeps statistics on what browsers/versions are most
commonly used?

TIA

Kris
 
D

DU

Kris said:
DU,

Will adding a style section to my header really fix the page in NS 4.8?


I have no idea. It should. Try it. All I know is I gave you a css rule
which should render a background color to your body element in CSS1
compliant browsers. The CSS1 specification was officially released 7
years ago, you know.

If
it does then that seems to indicate that the problem in NS 4.8 is no support
for external style sheets, but it seems like some of my other css properties
from the external style sheets are working.

Have you validated your document markup syntax with the W3C validator?
http://validator.w3.org/
Do you use a doctype declaration in your document? Where is your
document anyway?
I agree about the image. A blue border would be a good idea to indicate
that it's a link. However, the image I'm using is a gif with transparency.
The actual image content is not rectangular. When the default border came
up it looked hideous (probably because it was too thick also), so I just
yanked it off in css, and then again later with the html border attribute
for NS 4.8. Do you know a way to make the border actually fit the image
content, or perhaps another simple way to indicate that it's a link without
having the nasty rectangular border? Again, what's the problem with just
leaving my page non-validating?

Your comment about content being the only significant thing with older
browsers would normally be true, but this will be a commercial site.

WAI and Web Content Accessibility Guidelines (WCAG) 1.0 checkpoints
should still apply to commercial site: it's furthermore important that
your document should.
What is wrong with indicating clearly in a file called, say, "Web
browser support for this site", that your commercial site supports
browsers which comply with widely known and well established browsers
which comply with W3C web standards such as CSS1 properties, DOM1
attributes and methods and HTML 4.01 strict DTD? You can even list the
ones which were used to verify the site.
Again, I'm repeating that NS 4 was designed, conceived and developed
more than 7 years ago. For Mac, Safari 1.0, MSIE 5.2.3 for Mac, Camino
0.7, NS 7.1 for Mac, Mozilla 1.5 for Mac, Opera 7.x for Mac, ICab 2.9.5,
were all conceived, designed and developed no more than 4 years ago or
so and they all support CSS1, CSS2, DOM1, DOM2, HTML 4.01 and XHTML (and
an appreciable number of other specs).
NS 4 is obsolete, deprecated.
Appearance matters for all customers, unfortunately.

Appearance does not matter more than access to content. Definitively not
so in a commercial site.
NS 4 users are accustomed to awkward rendering, imbalanced layout and
quirks of all sorts because the DOM their browser support is no longer
coded for on the web.

Obviously the site
can't look great for all users.

Then deal with this.

There are some errors in NS 4.8 that I just
can't fix without destroying the way the page looks in modern browsers.

"looks". Your word. Not mine. My word is "access to content".

That brings me to another question. Is there a way to see how my page is
going to look in all the pc versions of IE without actually installing them
all on a pc?

If there was a way, then the normal question would be how reliable is
such way, such tool? In the final analysis, the only way to know for
sure how a page will look in all the pc versions of IE (and any other
browsers) is to actually use these browsers.

Trying to support all versions of all browsers is unrealistic. Making
sure by visual verification that content degrades as gracefully as
possible in all browsers (that content is still accessible) is
reasonable and is what the WCAG are about.

So far I've been testing NS 4.8, Safari 1.0v85.5 and IE 5.2 on
the mac. On the PC I've been testing NS 7, and trying to test IE 6 but it
keeps bombing. Are there any other browsers I should be testing? Do you
know of any place that keeps statistics on what browsers/versions are most
commonly used?

TIA

Kris

You ask a lot of questions but you never mention where this page, site
is. No url.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
J

John C

Again, what's the problem with just
leaving my page non-validating?

Hi, Kris. Near as I've been able to find out, that won't cause a
significant riff in the space-time continuum. Somebody can correct me if
I'm wrong, but I don't believe using an invalid attribute in a page with
a "standards" mode 4.01 strict doctype will kick a "modern" browser like
IE6 or Mozilla out of "standards" mode. You would be prohibited, morally
at least, from displaying the "valid html" logo on your page. To me (not
that I count) there's a difference between validation failure due to
carelessness, cluenessness or stupidity, and failure by choice after
attempting all reasonable means to comply with the dtd. The W3C says,
"W3C produces what are known as "Recommendations". IOW, the 4.01
specification is not exactly an edict, although it is sort of a Holy
Grail among authors who care. Again, I'm only speaking for myself and I'm
neither a professional web author nor a "regular" in this NG.

Whether you should fall back to 4.01 transitional doctype just to
"validate" depends on whether your other html and css is best rendered in
"standards" or "quirks" mode. If it makes no difference and you want to
display the "valid html" logo, then 4.01 transitional doctype may be the
way to go. I think it'd be better to stick with 4.01 strict with the one
or two intentional "errors" you can't avoid. Maybe there's a reason this
would be ill advised, but I don't know what it is.

Personally, I've had pretty good luck getting 4.01 strict and CSS 2
layouts to look very much the same in NS4 as they do in IE and Moz, even
3-column non-table layouts. Partly because the design allows enough slop
in positioning that the differences don't matter aesthetically. I have a
page where that bright blue border on an image link in NS4 is really
unnecessary and ugly, and frankly I haven't decided yet whether to go
ahead and stick in the border="0". Maybe later. For now I'm still
savoring the "congratulations, this validates as html 4.01 strict"
message.
Are there any other browsers I should be testing? Do you
know of any place that keeps statistics on what browsers/versions are most
commonly used?

I don't know Mac or Unix, only PC's, where you need to test on Mozilla
1.4, IE6, IE5 and/or IE5.5, Opera, Lynx and NS4. I think NS7 will be same
as Mozilla. You can have all these installed on the PC except for
multiple versions of IE. If you have a big enough HD, you can create a
separate partition and put a different version of IE there. Or you can
put IE5 on a cheap standby PC, or have a friend with 5.5 tell you how it
looks. There's also software to run a virtual alternative OS with a
different IE version, but that's over my head, for sure.
 
T

Toby A Inkster

John said:
omebody can correct me if
I'm wrong, but I don't believe using an invalid attribute in a page with
a "standards" mode 4.01 strict doctype will kick a "modern" browser like
IE6 or Mozilla out of "standards" mode.

You're not wrong.

By the way, an elegent workaround for your problem might be something like:

<img height="10" width="20" src="smallimage.png"
alt="A mouse" -- border="0" -- title="A mouse">

Technically the border is now a comment and should be ignored, although
most browsers won't see it that way! I think this would make your HTML
valid, but am not 100% sure. Try it out and see.
 
K

Kris

You're not wrong.

By the way, an elegent workaround for your problem might be something like:

<img height="10" width="20" src="smallimage.png"
alt="A mouse" -- border="0" -- title="A mouse">

Technically the border is now a comment and should be ignored, although
most browsers won't see it that way! I think this would make your HTML
valid, but am not 100% sure. Try it out and see.


That was a good idea, but the validator actually gave more errors when I
tried it like that. Each -- was noted as an error, as well as the original
error.

I think I'm just going to leave this page non-validating. Thanks.
 
J

John C

You're not wrong.

By the way, an elegent workaround for your problem might be something like:

<img height="10" width="20" src="smallimage.png"
alt="A mouse" -- border="0" -- title="A mouse">

Technically the border is now a comment and should be ignored, although
most browsers won't see it that way! I think this would make your HTML
valid, but am not 100% sure. Try it out and see.

That worked on the border but didn't validate. The following works and
validates, altho it looks like it wouldn't:

<img src="images/mouse.gif" alt="mouse" <!-- border="0" -->

It violates one's sense of needing the same number of opening and closing
"brackets". I didn't try adding other attributes before the "comment" but
assume they'd fly. But I wonder if this is really valid html even though
it "validates". It seems an example of how to cheat and get away with
it. Maybe you or somebody like Jukka would know. I think I'd rather just
use the invalid attribute and fail the validation, unless maybe I was
getting paid enough to exchange my integrity for a "valid html" badge.
;-)
 
J

John C

That worked on the border but didn't validate. The following works and
validates, altho it looks like it wouldn't:

<img src="images/mouse.gif" alt="mouse" <!-- border="0" -->

It violates one's sense of needing the same number of opening and closing
"brackets". I didn't try adding other attributes before the "comment" but
assume they'd fly. But I wonder if this is really valid html even though
it "validates". It seems an example of how to cheat and get away with
it. Maybe you or somebody like Jukka would know. I think I'd rather just
use the invalid attribute and fail the validation, unless maybe I was
getting paid enough to exchange my integrity for a "valid html" badge.
;-)

I've reconsidered the cheating question. It's not our fault NS4 can't
follow the rules. If we use a hack solely to get NS4 to mimic what
standards compliant browsers do with our otherwise valid html/css, and if
our hack still validates, there should be no dishonor in using it and
claiming our "valid html" badge.
 
K

Kris

Kris said:
I think I'm just going to leave this page non-validating. Thanks.

I would like to kindly request of you that you alter your handle in this
group. I go by the handle "Kris" as well and do so for a long time
already. Possibly mixing up authors, this may be of inconvenience to the
people who frequent this group and value posts of both you and me.

I am sure we can sort this out. We can always have a duel about it. :)
 
J

John C

I would like to kindly request of you that you alter your handle in this
group. I go by the handle "Kris" as well and do so for a long time
already. Possibly mixing up authors, this may be of inconvenience to the
people who frequent this group and value posts of both you and me.

I am sure we can sort this out. We can always have a duel about it. :)

Duelling isn't legal! However, I just happen to know a good lawyer... ;-)
 
K

Kris7

I would like to kindly request of you that you alter your handle in this
group. I go by the handle "Kris" as well and do so for a long time
already. Possibly mixing up authors, this may be of inconvenience to the
people who frequent this group and value posts of both you and me.

I am sure we can sort this out. We can always have a duel about it. :)

Ok, it should be changed now. I was sort of looking forward to a unicycle
joust though... (it's for real, check on google!)

In other news, I just learned that only 1% of web users have NS 4. Now I no
longer care what the page looks like in NS 4. As somebody else mentioned,
those people should be very used to pages looking like crap. I tried
surfing with NS 4 and it drove me nuts after about 2 minutes.

However, I do have 2 new questions. My site uses a paypal shopping cart.
The code from paypal includes a target attribute in the form tag. The
validator gives an error due to that, but I'm not sure if I can remove it
without screwing up the cart. Ideas?

Also, anybody know where I can download IE 5. It is supposedly used by 34%
of web users, so I figure I should test my site in it. Microsoft no longer
has a download link for it, and every other page I've found just links to
M$.

Oh, btw, the code I'm working on will be temporarily available at
http://hedgemaze.2y.net:3000/ia/

TIA
 
A

Adrienne

I've reconsidered the cheating question. It's not our fault NS4 can't
follow the rules. If we use a hack solely to get NS4 to mimic what
standards compliant browsers do with our otherwise valid html/css, and
if our hack still validates, there should be no dishonor in using it
and claiming our "valid html" badge.

There is a work around for NS4:

<p><a href="example.html" style="border:0px"><img src="example.gif"
style="border:0px" height="100" width="100" alt="Example"></a></p>

This validates and there is no border around the image. This will not work
in a style element, nor in an external stylesheet.
 
E

Eric B. Bednarz

I think you are seriously confused with markup declarations here.
That worked on the border but didn't validate. The following works and
validates, altho it looks like it wouldn't:

<img src="images/mouse.gif" alt="mouse" <!-- border="0" -->

It violates one's sense of needing the same number of opening and closing
"brackets".

'One' being RTFM-resistant entities like web-wowser-vendors. Sure.
HTML's SGML imit^H^H^H^Hdeclaration, however, denies such a need.
I didn't try adding other attributes before the "comment" but
assume they'd fly. But I wonder if this is really valid html even though
it "validates".

When it validates--curly-, smart-, us-ascii- or no quotes at all--it is
valid. Full stop. Whether or not the factual syntactic and/or semantic
implications reflect the goals of $author is utterly irrelevant in that
context. As it happens to be, quite regularly they don't.

The TAGC character '>' is omissible when the tag is followed by markup
(like another tag, a processing instruction or a comment declaration).
[...] I think I'd rather just
use the invalid attribute and fail the validation,

That's okay, as long as you remove the doctype artefact; you wouldn't
want to declare rules for your document instance that it doesn't follow,
would you? Oh wait, you (read: 'one") *would* indeed do that for
bogotic implementations that treat doctype declarations as processing
instructions. Barf, barf.
unless maybe I was
getting paid enough to exchange my integrity for a "valid html" badge.

There is no such thing as "valid html([0])"[1].


[0] insert optional version voodoo here

[1] for self-documenting proof, refer to the side effect of this
practical joke which I incidentally put up when answering a message
in another group just yesterday:
<http://sandbox.bednarz.nl/sgml/html/shorttag/poesie.html>
 

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

Members online

Forum statistics

Threads
474,083
Messages
2,570,589
Members
47,211
Latest member
JaydenBail

Latest Threads

Top