Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member igeek's Avatar
    Join Date
    Oct 2005
    Posts
    202
    Member #
    11644
    Im looking for any feedback on which doctype is the best to use and why you should use one doctype over another..

    Is this just simply a style preference of coding XHTML or is there solid reasons behind this..
    If you don’t use a doctype then the browser goes into Quirks mode.. then why aren’t doctypes this just build into browsers?

    why is there a URL in the doctype and what exactly does that do?

    I can find listings of doctypes that work but not really any solid explanations as to why you should you use one over another…does it really matter?

    I always seem to use this doctype.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

  2.  

  3. #2
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    Doctypes give information about a site and its content, some sites are xhtml strict well others are transitonal and so forth. In an attempt to make browsers smaller and to make it easier to identify content doctypes were designed.
    there are a few basic levels of doctype
    -Xhtml - strict
    -Xhtml - transitonal
    -Xhtml - basic
    -Html 4.0 - strici
    -Html 4.0 - transitonal
    ect...
    Thee Pyro Wolf

  4. #3
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    You may want to go with XHTML Strict. I've heard that transitional is used when you're switching a site from HTML to XHTML. Strict can be used if you're making a site from scratch.

    I personally use XHTML transitional though because that's the one that my version of DW spits out.

    The URL in the doctype points to a document type definition, a file that describes the alllowable structure of an XML page.

  5. #4
    Senior Member igeek's Avatar
    Join Date
    Oct 2005
    Posts
    202
    Member #
    11644
    thanks eddy,

    so then a transistional may be used if you use a mixture of XHTML and HTML
    but strict can be used if your only using XHTML ..

    so you cant use a trasitional on a strict page...?
    why is there so many different doctypes then?

    how can these three catagories be used? an anyone give an example of why you would use one over the other..

    HTML 4.01 Strict, Transitional, Frameset
    XHTML 1.0 Strict, Transitional, Frameset
    XHTML 1.1 DTD

  6. #5
    Senior Member Arkette's Avatar
    Join Date
    Jan 2006
    Location
    Europe
    Posts
    102
    Member #
    12297
    The Doc Type and the dtd definition file tells a browser how to parse a document and how to render it (lay it out ) on screen. The Doc type is specific to the page not the site, you can have HTML 4.01 on one page and XHTML1.1 on another within the same site it doesn't matter. What does matter is that the page is structured and verifies correctly against it's Doc type. If your writing standards compliant pages and you want them to render exactly the same in all modern browsers (well almost exactly,) then I suggest you choose a strict Doc type, preferably I would say XHTML and then learn the structure and rules for that and stick to it.
    End of Line.

  7. #6
    Junior Member Aphonik's Avatar
    Join Date
    Jan 2006
    Location
    Kent, England
    Posts
    17
    Member #
    12350
    Check out this explanation at w3shools.com on DocTypes: http://www.w3schools.com/tags/tag_doctype.asp
    It explains everything you need to know about DocTypes; w3schools is an excellent source of information and I recommended it when learning anything to do with web coding!

    Aophonik

  8. #7
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    The Frameset one (HTML of XHTML) are for when you want to use frames in your site.

    You can use transitional on a strict page but... what would be the point? You already have the code strict so might as well put the right DOCTYPE for it.

    Transitional is when you decide to code while still using some of the deprecated attributes. Strict is when you use NONE of the deprecated attributes.

    Hope that helped a bit
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  9. #8
    Senior Member igeek's Avatar
    Join Date
    Oct 2005
    Posts
    202
    Member #
    11644
    thanks all... for your help.

  10. #9
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I use XHTML Transitional. I don't like strict only because you can't use the target attribute in links.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  11. #10
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    Quote Originally Posted by filburt1
    I use XHTML Transitional. I don't like strict only because you can't use the target attribute in links.
    The point of the target attribute is to place it in frames or windows so why they would take it out exceeds me although it is includeded in frameset.
    Thee Pyro Wolf


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:20 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com