|
|
 |
|
January 3rd, 2008, 06:14 PM
|
#1
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Using a valid Doctype
Hey,
I've just tried validating a page and it's said that my site does not have a valid doctype. I have tried lots of different doctypes and none seem to work. Can someone take a look at my source code and tell me what doctype is best suited?
Thanks in advance.
my site is www.weightgain4you.com
|
|
|
January 3rd, 2008, 06:20 PM
|
#2
|
|
Highly Reputable Member
Join Date: Sep 2007
Age: 17
Posts: 716
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Actually, it does have a valid doctype, just a whole bunch of code errors!
124 Validation Errors
However, I suggest switching to Strict, Transitional is not good.
|
|
|
January 3rd, 2008, 06:24 PM
|
#3
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Thats great, nice one.
I have seen that I had 124 errors but I just figured that it was the wrong doctype or something (I've tried a few). How come transitional isn't so good? I also use java, css, and php on the page, will this not effect what doctype it will be?
Thanks
Wes
|
|
|
January 3rd, 2008, 06:27 PM
|
#4
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Just seen this, what does it mean?
No Character Encoding Found! Falling back to UTF-8.
|
|
|
January 3rd, 2008, 06:29 PM
|
#5
|
|
Highly Reputable Member
Join Date: Sep 2007
Age: 17
Posts: 716
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Well, first of all, the validation errors are small issues in your code. The doctype doesn't fix incorrect code, it just tells the browser how to read it. So, you still need to fix your code.
Second, using HTML 4.01 Strict is the best choice since Transitional is a bad doctype! Why? Because it's a bugged up, crappy duplicate of Strict. Transitional is full of bad standards! Strict is just better!
|
|
|
January 3rd, 2008, 06:31 PM
|
#6
|
|
Highly Reputable Member
Join Date: Sep 2007
Age: 17
Posts: 716
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
The character encoding should be set in the <head> like this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
And the Strict doctype looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Cheers
|
|
|
January 3rd, 2008, 06:35 PM
|
#7
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Thanks. Can you check the source code for me now and see if it's correct?
|
|
|
January 3rd, 2008, 06:38 PM
|
#8
|
|
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 461
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Try adding this in your <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
that should cure one problem.
|
|
|
January 3rd, 2008, 06:39 PM
|
#9
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
yea thanks I've already done that 
|
|
|
January 3rd, 2008, 06:43 PM
|
#10
|
|
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 461
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
not quick enough on the keyboard 
|
|
|
January 3rd, 2008, 06:44 PM
|
#11
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
no worries 
|
|
|
January 3rd, 2008, 06:49 PM
|
#12
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
How would I write the code to correct some of the problems? I look at the first error on the validation page and it says it is written incorrectly and that there is no attribute height in the document type. This is the only way I can write the attributes using dreamweaver, isn't it?
Thanks,
Wes
|
|
|
January 3rd, 2008, 06:50 PM
|
#13
|
|
Highly Reputable Member
Join Date: Sep 2007
Age: 17
Posts: 716
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
To see the errors, check this link: W3C Validator
|
|
|
January 3rd, 2008, 06:55 PM
|
#14
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
I can see the errors, but can you just take a look at the first one and explain to me how I can correct it? It's the only way I can write it using dreamweaver.
Thanks
|
|
|
January 3rd, 2008, 07:05 PM
|
#15
|
|
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 461
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
How can I explain this.
The height attribute is deprecated and can be achieved using CSS, thus validating that part of your code.
If I am wrong Swagner please tell me.
|
|
|
January 3rd, 2008, 07:13 PM
|
#16
|
|
Highly Reputable Member
Join Date: Sep 2007
Age: 17
Posts: 716
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Pat, that is quite correct. The height attribute is not allowed since it is bad code.
|
|
|
January 3rd, 2008, 07:13 PM
|
#17
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
I aint that great at css, and what do you mean the attribute is deprecated?
|
|
|
January 3rd, 2008, 07:13 PM
|
#18
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Quote:
Originally Posted by swagner
Pat, that is quite correct. The height attribute is not allowed since it is bad code.
|
Does this mean I can just delete it?
|
|
|
January 3rd, 2008, 07:23 PM
|
#19
|
|
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 461
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Yes you can delete it, but you may have to change your CSS to compensate for it.
Looking at your code you may have a lot to learn CSS wise but we are her to help.
So keep on asking.
Pat
PS. Am now drunk and going to bed.
|
|
|
January 3rd, 2008, 07:28 PM
|
#20
|
|
New Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 23
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Using a valid Doctype
Thanks for your help. How you can talk about this stuff drunk I don't know ;0) Now I know why you said you were'nt quick enough on the keyboard.
I'll take your word for that! I'm sure I'm gonna be asking a hell of a lot more questions in here, don't worry about that
What problems will I get if I just keep my source code the way it is and not correct the errors?
PS. Thanks for your help, both of you.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
which doctype??
|
geyids |
HTML, XHTML and CSS |
11 |
March 12th, 2008 11:18 PM |
|
[SOLVED] Doctype
|
mcdanielnc89 |
HTML, XHTML and CSS |
3 |
October 20th, 2007 07:00 PM |
|
which doctype?
|
aflacduck |
Your Design and Layout |
19 |
June 17th, 2007 03:34 PM |
|
Doctype or no Doctype
|
notagz1 |
How is this done? |
6 |
June 15th, 2007 09:11 PM |
|
Doctype
|
ahm531 |
HTML, XHTML and CSS |
2 |
September 6th, 2006 03:55 AM |
|