Using a valid Doctype

This is a discussion on "Using a valid Doctype" within the Web Page Design section. This forum, and the thread "Using a valid Doctype are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 3rd, 2008, 22:14
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote

  #2 (permalink)  
Old Jan 3rd, 2008, 22:20
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #3 (permalink)  
Old Jan 3rd, 2008, 22:24
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #4 (permalink)  
Old Jan 3rd, 2008, 22:27
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

Just seen this, what does it mean?

No Character Encoding Found! Falling back to UTF-8.
Reply With Quote
  #5 (permalink)  
Old Jan 3rd, 2008, 22:29
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #6 (permalink)  
Old Jan 3rd, 2008, 22:31
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

The character encoding should be set in the <head> like this:
HTML: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
And the Strict doctype looks like this:
HTML: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Cheers
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #7 (permalink)  
Old Jan 3rd, 2008, 22:35
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

Thanks. Can you check the source code for me now and see if it's correct?
Reply With Quote
  #8 (permalink)  
Old Jan 3rd, 2008, 22:38
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

Try adding this in your <head>

HTML: Select all
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
that should cure one problem.
Reply With Quote
  #9 (permalink)  
Old Jan 3rd, 2008, 22:39
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

yea thanks I've already done that
Reply With Quote
  #10 (permalink)  
Old Jan 3rd, 2008, 22:43
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

not quick enough on the keyboard
Reply With Quote
  #11 (permalink)  
Old Jan 3rd, 2008, 22:44
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

no worries
Reply With Quote
  #12 (permalink)  
Old Jan 3rd, 2008, 22:49
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #13 (permalink)  
Old Jan 3rd, 2008, 22:50
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

To see the errors, check this link: W3C Validator
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #14 (permalink)  
Old Jan 3rd, 2008, 22:55
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #15 (permalink)  
Old Jan 3rd, 2008, 23:05
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #16 (permalink)  
Old Jan 3rd, 2008, 23:13
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

Pat, that is quite correct. The height attribute is not allowed since it is bad code.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #17 (permalink)  
Old Jan 3rd, 2008, 23:13
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

I aint that great at css, and what do you mean the attribute is deprecated?
Reply With Quote
  #18 (permalink)  
Old Jan 3rd, 2008, 23:13
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a valid Doctype

Quote:
Originally Posted by swagner View Post
Pat, that is quite correct. The height attribute is not allowed since it is bad code.
Does this mean I can just delete it?
Reply With Quote
  #19 (permalink)  
Old Jan 3rd, 2008, 23:23
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #20 (permalink)  
Old Jan 3rd, 2008, 23:28
Junior Member
Join Date: Nov 2007
Location: UK, Greater Manchester
Age: 21
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
which doctype?? geyids Web Page Design 11 Mar 13th, 2008 02:18
[SOLVED] Doctype mcdanielnc89 Web Page Design 3 Oct 20th, 2007 23:00
which doctype? aflacduck Starting Out 19 Jun 17th, 2007 19:34
Doctype or no Doctype notagz1 Website Planning 6 Jun 16th, 2007 01:11
Doctype ahm531 Web Page Design 2 Sep 6th, 2006 07:55


All times are GMT. The time now is 20:05.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43