HTML Validation

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

Hey everyone.
I have a script, that to me, looks in absolute Perfect condition.
All it is it a table, it is an empty template.
For some reason, both Dreamweaver and a couple of online validators are saying there are errors all over the script.

Can anyone here please take a look at the script, and tell me what to remove/edit?

Quote:

New Page 1

 

 
 
 

 
 
 

 
 

 

All the best news here: https://newsbotnet.com

He has: 629 posts

Joined: May 2007

Quote: All it is it a table, it is an empty template.

A template for what, exactly? Something like this perhaps?

greg's picture

He has: 1,581 posts

Joined: Nov 2005

What are you validating to?
There are loads of doctypes, HTML 4.01 strict/transitional, XHTML strict/transitional etc etc
And where it might have a few errors in one type it will have more or less in another

I tried it to a few doctypes and seemingly in all it doesn't like the heights in the table border and table width.
But that's only HTML 4.01 transitional, where it allows many things it perhaps shouldn't
Whether the code validates or not really depends on what level you are wanting to write you code to.
As soon as you put that code in strict it has 18+ errors, most of them easy to fix though

Go here
http://validator.w3.org/#validate_by_input
and paste that code into the input box
then select the doctype from the drop down and you will see what i mean (or better yet put your own doctype into the code)

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

ahh, ok then, i will do that tomorrow, it is nearly 2:00am here, (yawn) lol.
I dont know what to validate to, its just i hate seeing errors in the dreamweaver repots. I think it is HTML 4.0.
Thanks for replying. your help is very much apprieciated. Smiling

All the best news here: https://newsbotnet.com

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

The first big problem you'll have with the validator is there's no DOCTYPE at the top of the file. That tells the validator (and Web browsers) what level of code you're writing, Dreamweaver would put that in automatically, Frontpage probably wouldn't. In general you should avoid Frontpage as it writes awful code, and worse it always thinks it knows best. Smiling

To start out, you could put this at the top of your file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
'

After you've had a sleep of course, it's hard to think when you're tired. Smiling

a Padded Cell our articles site!

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

Heyz, yeah, i sorted that snag about 2 mins after i submitted the post, lolz. I got it sorted, and yes, i strongly agree about frontpage, trouble is, i can create better pages in that, and it also displays my templates better, but i am already making a slow transition into dreamweaver, partly because it supports PHP, and this is something i will be working with a lot more now I started databases.
Thanks for the reply, and just so you know, the Database is going great.
I have just updates my whole website, now the template is embedded with CSS.
It has never been faster.
Full speed ahead!!!
PS: I have also put a 88 x 31 banner (pointing to your servers) on my homepage.
take a look,
http://www.pcgenius.co.nr/

All the best news here: https://newsbotnet.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.