Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How do you know which Doctype to use?
Old 08-24-2007, 01:50 AM How do you know which Doctype to use?
Experienced Talker

Posts: 37
Trades: 0
I'm not a real web designer, just a hobby, but it seems important to have a doctype to conform to web standards. How do you know which doctype standard to use for your site.

For example on the site I'm designing now, www.standrewcarolstream.org/test.html

I'm currently using the HTML 4.01 transitional doctype and everything shows up fine in I.E 6 and Firefox. It appears most sites use an XHTML doctype, but when I tested my site with that doctype my page didn't display properly in Firefox. For example when the xhtml doctype was used my navigation and content <div> where not centered like the rest of the page leaving the navigation and content on the left margin.

Thanks,
Chris
cch068 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-24-2007, 10:24 AM Re: How do you know which Doctype to use?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
It appears most sites use an XHTML doctype,
Not hardly. The use of the XHTML doctype is growing, but I see far more that are still using HTML 4.01 Transitional.

Quote:
but when I tested my site with that doctype my page didn't display properly in Firefox.
That's because there are more stringent rules to using the XHTML doctype, and Transitional is slightly more forgiving than Strict. Still, you have to follow the rules required for that doctype.

Quote:
For example when the xhtml doctype was used my navigation and content <div> where not centered like the rest of the page leaving the navigation and content on the left margin.
How did you code it to achieve centering ? If you used 'div align="center"' it was incorrect for XHTML.

If you're not ready to code to the higher standards of XHTML, then stick to HTML 4.01, but use HTML 4.01 STRICT instead of Transitional. Strict forces you to use cleaner code and follow some real rules.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-25-2007, 09:06 PM Re: How do you know which Doctype to use?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
yurp what she said

have a go with the validator.w3.org W3 validatior, stich it in tellit to check at xhtml transitional, and it will show you all your bits which are wrong and can help you learn. and then when u code next time you use the xhtml rules and you will get less validation problems
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to How do you know which Doctype to use?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48440 seconds with 12 queries