By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,622 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,622 IT Pros & Developers. It's quick & easy.

2 errors - HTML 4.01 Transitional validation

P: n/a
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>

For the first if I delete the color attribute obviously it changes colour
which isn't what i want.
For the second i'm not really sure about.

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's
auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?

At the top i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Jul 20 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:W0*********************@news-text.cableinet.net...
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.
Ah, that's where you're wrong. There's plenty you can do about it. :)

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
This is presentational, so you'll want to use CSS for this job. You have
severeal options:
1. Apply a style to all of your <hr> elements that make them 1px high with a
color of #CCCCCC. In the head of your document (or in an external style
sheet), add the following:

<style type="text/css">
hr { height: 1px; color: #CCCCCC; }
</style>

Then replace <hr size="1" color="#CCCCCC"> with <hr>. The end result will
be valid, and should look like what you had before.

2. Apply a class to specific <hr> elements that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
..seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr class="seperator">
(Note, you can call the class name anything you'd like, as long as what's in
the HTML matches your CSS, and assuming you follow CSS naming rules).

3. Apply an ID to a single <hr> element that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
#seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr id="seperator">
(Note, you can call the ID name anything you'd like, as long as what's in
the HTML matches your CSS, and assuming you follow CSS naming rules).

2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>

Again, presentational. From the looks of it, this table is being used for
layout (which is a job for CSS, not HTML). However, rather than lecture you
on the err of your ways...

<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif) no-repeat
top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's
auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?


Dreamweaver is wrong.

My recommendation to you would be to learn some CSS. It's not difficult to
learn, and it's the new standard for presentational properties of a web
page. The spec is available on the W3 website (www.w3.org) and I'm sure you
can probably find some tutorials if you Google search.

Regards,
Peter Foti

Jul 20 '05 #2

P: n/a
StardogChampion wrote:
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>
Validation aside, these are presentation issues, and are best left to
css. And if you put them where they belong, i.e., in an external css
file, the html may validate. But it looks like you have more
important things to worry about. Are those tables for layout?
Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's
auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong.
Unless there is a bug in the validator, and noone has reported any to
explain what you are seeing, the validator is only doing its job,
reporting that the html does not conform to the spec that you've
claimed it conforms to. In other words, Dreamweaver is wrong.
What am I doing wrong to get these errors?
....using Dreamweaver. ;-)
At the top i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
No uri?
http://www.w3.org/QA/2002/04/valid-dtd-list.html
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


Headers to declare content type should be sent out in the headers of
the html file to be sent, not in the html itself.

Figure out how to send correct headers, and if you're using tables for
layout, stop. These are far more important, imho, than whether your
html validates.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #3

P: n/a
"Peter Foti" <pe****@systolicNOSPAMnetworks.com> wrote in message
news:vv************@corp.supernews.com...
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:W0*********************@news-text.cableinet.net...
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.
Ah, that's where you're wrong. There's plenty you can do about it. :)

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>


This is presentational, so you'll want to use CSS for this job. You have
severeal options:
1. Apply a style to all of your <hr> elements that make them 1px high with

a color of #CCCCCC. In the head of your document (or in an external style
sheet), add the following:

<style type="text/css">
hr { height: 1px; color: #CCCCCC; }
</style>

Then replace <hr size="1" color="#CCCCCC"> with <hr>. The end result will
be valid, and should look like what you had before.

2. Apply a class to specific <hr> elements that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
.seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr class="seperator">
(Note, you can call the class name anything you'd like, as long as what's in the HTML matches your CSS, and assuming you follow CSS naming rules).

3. Apply an ID to a single <hr> element that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
#seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr id="seperator">
(Note, you can call the ID name anything you'd like, as long as what's in
the HTML matches your CSS, and assuming you follow CSS naming rules).

2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>

Again, presentational. From the looks of it, this table is being used for
layout (which is a job for CSS, not HTML). However, rather than lecture

you on the err of your ways...

<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif) no-repeat top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's
auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?
Dreamweaver is wrong.

My recommendation to you would be to learn some CSS. It's not difficult

to learn, and it's the new standard for presentational properties of a web
page. The spec is available on the W3 website (www.w3.org) and I'm sure you can probably find some tutorials if you Google search.

Regards,
Peter Foti

Thank you for your thourough explanations. I have used your second step to
fix my horizontal rules, since i already had an external stylesheet. So
basically i need to remember that CSS is for layout and presentation, not
HTML!
<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif) no-repeat top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>


Can i put ".rightbittorrentlayout { background: url(right-bittorrent-bg.gif)
no-repeat top left; }" in my stylesheet and use <td
class="rightbittorrentlayout">? I could've tried it already rather than
typing out another question... Thanks again, i'll read up some more on CSS.
Jul 20 '05 #4

P: n/a
"Brian" <us*****@julietremblay.com.invalid-remove-this-part> wrote in
message news:UyhIb.237311$_M.1045450@attbi_s54...
StardogChampion wrote:
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>
Validation aside, these are presentation issues, and are best left to
css. And if you put them where they belong, i.e., in an external css
file, the html may validate. But it looks like you have more
important things to worry about. Are those tables for layout?


I'm guessing they are, i remember reading a while ago about using CSS to
make tables but i didn't properly learn or use it, i'll go look at some
tutorials.
Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's
auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong.


Unless there is a bug in the validator, and noone has reported any to
explain what you are seeing, the validator is only doing its job,
reporting that the html does not conform to the spec that you've
claimed it conforms to. In other words, Dreamweaver is wrong.
What am I doing wrong to get these errors?


...using Dreamweaver. ;-)
At the top i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


No uri?
http://www.w3.org/QA/2002/04/valid-dtd-list.html


This was put at the top by Dweaver, so i just left it there.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


This IS in the <head> of my page, i was just pasting them since those are
the two parts which show what the validator looks for (encoding and
doctype).
Headers to declare content type should be sent out in the headers of
the html file to be sent, not in the html itself.

Figure out how to send correct headers, and if you're using tables for
layout, stop. These are far more important, imho, than whether your
html validates.

--
Brian
follow the directions in my address to email me


Thanks!
Jul 20 '05 #5

P: n/a
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:CX*********************@news-text.cableinet.net...
"Peter Foti" <pe****@systolicNOSPAMnetworks.com> wrote in message
news:vv************@corp.supernews.com...
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:W0*********************@news-text.cableinet.net...
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.
Ah, that's where you're wrong. There's plenty you can do about it. :)

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>


This is presentational, so you'll want to use CSS for this job. You have severeal options:
1. Apply a style to all of your <hr> elements that make them 1px high with a
color of #CCCCCC. In the head of your document (or in an external style
sheet), add the following:

<style type="text/css">
hr { height: 1px; color: #CCCCCC; }
</style>

Then replace <hr size="1" color="#CCCCCC"> with <hr>. The end result
will be valid, and should look like what you had before.

2. Apply a class to specific <hr> elements that you want to have these
properties. In the head of your document (or in an external style sheet), add the following:

<style type="text/css">
.seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr class="seperator">
(Note, you can call the class name anything you'd like, as long as what's in
the HTML matches your CSS, and assuming you follow CSS naming rules).

3. Apply an ID to a single <hr> element that you want to have these
properties. In the head of your document (or in an external style
sheet), add the following:

<style type="text/css">
#seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr id="seperator">
(Note, you can call the ID name anything you'd like, as long as what's in the HTML matches your CSS, and assuming you follow CSS naming rules).

2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>


Again, presentational. From the looks of it, this table is being used for layout (which is a job for CSS, not HTML). However, rather than lecture

you
on the err of your ways...

<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif)

no-repeat
top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>

Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong. What am I doing wrong to get these errors?


Dreamweaver is wrong.

My recommendation to you would be to learn some CSS. It's not difficult

to
learn, and it's the new standard for presentational properties of a web
page. The spec is available on the W3 website (www.w3.org) and I'm sure

you
can probably find some tutorials if you Google search.

Regards,
Peter Foti


Thank you for your thourough explanations. I have used your second step to
fix my horizontal rules, since i already had an external stylesheet. So
basically i need to remember that CSS is for layout and presentation, not
HTML!
<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif)

no-repeat
top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>


Can i put ".rightbittorrentlayout { background:

url(right-bittorrent-bg.gif) no-repeat top left; }" in my stylesheet and use <td
class="rightbittorrentlayout">? I could've tried it already rather than
typing out another question... Thanks again, i'll read up some more on

CSS.

It's OK, i tried it and it works, wahey. Thanks.
Jul 20 '05 #6

P: n/a
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:o6*********************@news-text.cableinet.net...
<style type="text/css">
#rightbittorrentlayout { background: url(right-bittorrent-bg.gif)

no-repeat
top left; }
</style>

<td id="rightbittorrentlayout">&nbsp;</td>


Can i put ".rightbittorrentlayout { background:

url(right-bittorrent-bg.gif)
no-repeat top left; }" in my stylesheet and use <td
class="rightbittorrentlayout">? I could've tried it already rather than
typing out another question... Thanks again, i'll read up some more on

CSS.

It's OK, i tried it and it works, wahey. Thanks.


Yeah, I got lazy at the end there and didn't duplicate the examples I gave
for the <hr>. :)

Pete
Jul 20 '05 #7

P: n/a

"Peter Foti" <pe****@systolicNOSPAMnetworks.com> wrote in message
news:vv************@corp.supernews.com...

[snip]
2. Apply a class to specific <hr> elements that you want to have these
properties. In the head of your document (or in an external style sheet),
add the following:

<style type="text/css">
.seperator { height: 1px; color: #CCCCCC; }
</style>

Then put this in your HTML <hr class="seperator">


I'm not in the habit of picking on people's spelling, but using misspelled
words in code causes maintenance headaches, since not everybody notices a
previous misspelling, and when they they have the misfortune of using the
correct spelling in new code, it tends to mess things up. :-) It's
"separator".

Jul 20 '05 #8

P: n/a
On Tue, 30 Dec 2003, Harlan Messinger wrote:
I'm not in the habit of picking on people's spelling, but using misspelled
words in code causes maintenance headaches, since not everybody notices a
previous misspelling, and when they they have the misfortune of using the
correct spelling in new code, it tends to mess things up.


Indeed - like "Referer" :-(

See RFC2616 section 14.36 for the correct spelling :-((
Jul 20 '05 #9

P: n/a

"Alan J. Flavell" <fl*****@ph.gla.ac.uk> wrote in message
news:Pi*******************************@ppepc56.ph. gla.ac.uk...
On Tue, 30 Dec 2003, Harlan Messinger wrote:
I'm not in the habit of picking on people's spelling, but using misspelled words in code causes maintenance headaches, since not everybody notices a previous misspelling, and when they they have the misfortune of using the correct spelling in new code, it tends to mess things up.


Indeed - like "Referer" :-(

See RFC2616 section 14.36 for the correct spelling :-((


Exactly! Of course, even correct spellings can leave room for error--is it
LOGON_USER or LOGIN_USER? :-(((

Jul 20 '05 #10

P: n/a
StardogChampion wrote:
Headers to declare content type should be sent out in the headers of
the html file to be sent, not in the html itself.
This IS in the <head> of my page, i was just pasting them since those are
the two parts which show what the validator looks for (encoding and
doctype).


The <head> portion of an HTML document, and the http headers sent before a
file are two different things.

http://www.htmlhelp.com/tools/validator/charset.html might be helpful.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #11

P: n/a
"Brian" <us*****@julietremblay.com.invalid-remove-this-part> wrote in
message news:UyhIb.237311$_M.1045450@attbi_s54...
StardogChampion wrote:
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.

1. Line 126, column 48: there is no attribute "COLOR"

<td height="1" colspan="5"><hr size="1" color="#CCCCCC"></td>
2. Line 286, column 27: there is no attribute "BACKGROUND"

<td width="4" background="right-bittorrent-bg.gif">&nbsp;</td>


Validation aside, these are presentation issues, and are best left to
css. And if you put them where they belong, i.e., in an external css
file, the html may validate. But it looks like you have more
important things to worry about. Are those tables for layout?
Dreamweaver MX suggests both the COLOR and BACKGROUND attributes on it's
auto pop-up thing while you're typing, so either DW is wrong or the
validator is wrong.


Unless there is a bug in the validator, and noone has reported any to
explain what you are seeing, the validator is only doing its job,
reporting that the html does not conform to the spec that you've
claimed it conforms to. In other words, Dreamweaver is wrong.
What am I doing wrong to get these errors?


...using Dreamweaver. ;-)
At the top i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


No uri?
http://www.w3.org/QA/2002/04/valid-dtd-list.html
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


Headers to declare content type should be sent out in the headers of
the html file to be sent, not in the html itself.

Figure out how to send correct headers, and if you're using tables for
layout, stop. These are far more important, imho, than whether your
html validates.

--
Brian
follow the directions in my address to email me


I've been looking at some CSS layout tutorials, but all the example pages
they show you seem to "squash" when the browser is minimized e.g.
http://www.alistapart.com/d/slashdot/ - this is a CSS re-design of
slashdot's code. When you resize it, some images overlap and a host of other
things. Is there a way to set a width so the browser can't "squash" your
text?
Jul 20 '05 #12

P: n/a
"StardogChampion" <st*************@blueyonder.co.uk> wrote in message
news:W0*********************@news-text.cableinet.net...
I have wittled down my errors from 12 to 2, but the 2 it shows i can't
really do anything about.
For the first if I delete the color attribute obviously it changes colour
which isn't what i want.
COLOR is IE-specific. Use CSS instead.
For the second i'm not really sure about.


BACKGROUND is not in the standards, but is supported by antique browsers
such as NN4. Use CSS. Also use BACKGROUND if you need to support antique
browsers that provide inadequate CSS support, and learn to live with such
validation errors.

Jul 20 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.