Forum Moderators: open

Message Too Old, No Replies

Questions about validation

         

jimshu79

3:58 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



hmm...i might need some help.

If I use CSE Validator, I fix all the errors and everything works great.
But if i use the [validator.w3.org,...] i get problems.
I'm wondering if i can email someone a couple files or a zip file with my htm files to see if anyone else can figure this out or tell me what I may be doing wrong...
or even the URL for that matter.
thanks!

Jim

BarkerJr

4:02 pm on Feb 27, 2004 (gmt 0)

10+ Year Member


If it's XHTML, I could take a look. But not HTML, cause that code is harder to debug. If it's small, just send me a forum mail, as it's faster than email.

DrDoc

4:02 pm on Feb 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



W3C is the authority on validation (and are usually never wrong)... However, you should preferably make sure that your page validates against both W3C and CSE (since I know some of the improved "warnings" included in CSE are really good).

What's the error you're having a problem with? Posting the discription here on the board should be sufficient enough. That way it will help others experiencing the same problem as well

jimshu79

5:05 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



First I get:
The HTTP Content-Type field.
The XML Declaration.
The HTML "META" element.

then when i add the meta tag:
<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1">

i get this:
This page is not Valid HTML 4.01 Transitional!
Below are the results of attempting to parse this document with an SGML parser.

with a couple lines of "error" or "compatibility" stuff below...

DrDoc

5:31 pm on Feb 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Keep that meta tag... and then take a look at the first error, fix whatever is wrong, revalidate, fix the first additional error, revalidate, etc until there are no more errors :)

What is the first error?

jimshu79

5:43 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



Below are the results of attempting to parse this document with an SGML parser.

Line 31, column 92: end tag for element "EMBED" which is not open (explain...).
...omedia.com/go/getflashplayer"></embed>');
^
Line 54, column 54: there is no attribute "BACKGROUND" (explain...).

but why would it say "not valid html 4.01 trans"?
is it because there are errors?
should even be using html 4.01 trans?

DrDoc

6:07 pm on Feb 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should consider removing the <embed> tag all together. But, before doing so, read this related thread [webmasterworld.com]

Which element has the background attribute?


Yes, it says that it's not valid HTML 4.01 since there are errors. I'd recommend sticking to the Transitional doctype for now... since there would be even more errors if you attempted to validate against the Strict doctype ;)

jimshu79

6:15 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



ok thanks! i'll work on that...

this is the line 54 code
</tr></table></center><center><table background="images/mai_349452-R1-E029_wh.jpg" width="800" border="1" cellspacing="0" cellpadding="20" bgcolor="#000000" bordercolor="#ff0000"><tr><!-- Row 1 Column 1 --><td width=500><FONT color="#DAD9DE"><FONT face=verdana size=2><b> <p><br></b></font></font>

can these errors hurt spiders from spidering my page?

Jim

jimshu79

6:15 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



yeah i figured if i went strict i'd spend half my life fixing errors...

jimshu79

6:21 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



i dont think i can get rid of the embed because it's a very small piece of flash on my homepage embedded in the html... =/

jimshu79

6:24 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



oh wait, i didn't see your link before...

DrDoc

6:32 pm on Feb 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



can these errors hurt spiders from spidering my page

It depends on the error... If the error is an open tag (such as <title instead of <title>), then yes, it most likely will hurt the spider's ability to crawl your page.

Other errors? Probably not hurt the spider... but it might hurt the user's ability to view your page.

Also, you should consider not using <font> or <center> tags at all. And, perhaps also look into using CSS for background, padding, centering, fonts, colors, etc.

But, let's not worry about that for now -- first get the page to validate
Then use CSS
Then try to validate against the Strict doctype ;)

jimshu79

6:38 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



got rid of the embed =)

jimshu79

6:42 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



ok now i'm confused...now i've got:
Line 46, column 54: there is no attribute "BACKGROUND" (explain...).

</tr></table></center><center><table background="images/mai_349452-R1-E029_wh.jpg" width="800" border="1" cellspacing="0" cellpadding="20" bgcolor="#000000" bordercolor="#ff0000"><tr><!-- Row 1 Column 1 --><td width=500><FONT color="#DAD9DE"><FONT face=verdana size=2><b> <p><br></b></font></font>
<p align="left"><font color="#000000">Rings<br>
</font><font color="#808080" size="2" face="verdana"><b><a href="http://www.example.com/sample_product.html">Sample Product</a></b></font><font color="#808080"><br>
</font><font color="#808080" size="2" face="verdana"><b><a href="http://www.example.com/sample_product_2.html">Sample Product 2</a></b></font><font color="#808080"><br>
</font><font color="#808080" size="2" face="verdana"><b><a href="http://www.example.com/sample_product_3.html">Sample Product 3</a></b></font>

[edited by: tedster at 2:31 am (utc) on Mar. 2, 2004]
[edit reason] remove specifics [/edit]

DrDoc

6:54 pm on Feb 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Removing
background="images/mai_349452-R1-E029_wh.jpg"
will take care of that error for you :)

Give the table an ID and use CSS to put the background in there.

<table id="foobar">

table#foobar {
background-image: url(images/mai_349452-R1-E029_wh.jpg);
}

jimshu79

7:00 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



ok, i have to run for now, but i will try it later this evening and post back...thank you!

jimshu79

8:55 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



didn't work =/ i obviously did it wrong....

where would this go?
<table id="foobar">

and where should this go?
table#foobar {
background-image: url(images/mai_349452-R1-E029_wh.jpg);
}

thank you again...and again.

Wertigon

12:09 pm on Feb 28, 2004 (gmt 0)

10+ Year Member



Right now I'd say use inline styles, then learn CSS properly, then go back and do it properly.

So instead of <table background="someimage.png"> do <table style="background-image : url(someimage.png);">

Otherwise you can use an id, try this:

<html>
<head>
<title>Gnu</title>
<style type="text/css">
#foobar {
background-image : url(someimage.png);
}
</style>
</head>
<body>
<table id="foobar">
[...]
</table>
</body>
</html>

g1smd

5:33 pm on Mar 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> <td width=500><FONT color="#DAD9DE"><FONT face=verdana size=2><b> <p><br></b></font></font> <<

You should do all the tags in lower case. You can't have paragraphs inside font tags. The code is messy. All attribute values should be in "quotes".

.

>> <font color="#808080" size="2" face="verdana"><b><a href="http://www.example.com/sample_product.html">Sample Product</a></b></font> <<

This is code bloat. This is a heading, no? You just need:

<hx> the link in here </hx>

or maybe even do this all as a list:

<ul>
<li> link </li>
<li> link </li>
etc.

Get rid of all the <font>, <b> and <i> tags and use CSS.

[edited by: tedster at 2:34 am (utc) on Mar. 2, 2004]
[edit reason] use example.com [/edit]

jimshu79

6:02 pm on Mar 1, 2004 (gmt 0)

10+ Year Member



ok i'll try some of this stuff out...thank you!

jimshu79

6:11 pm on Mar 1, 2004 (gmt 0)

10+ Year Member



yeah no good...didnt' work...i'll have to learn more about css...as long as i'm validating ok using the pro version of CSE html validator i'll leave it at that.

thanks guys.
Jim

jimshu79

11:28 pm on Mar 3, 2004 (gmt 0)

10+ Year Member



oh i messed up, did it right this time and it worked....thank you!