Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 6 123 ... LastLast
Results 1 to 15 of 84
  1. #1
    Banned
    Join Date
    Mar 2003
    Posts
    224
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dtd

    How do I know which doctype to use?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Depends exactly what you are coding in, HTML or XHTML. Once you know that then it is a process of choosing which type of doctype, transitional, strict, or frameset.

    frameset- This one is obvious, if you are using frames, use this.

    transitional- I am not sure if W3 meant this or not, but I usually think of transitional being used if you are transistioning between two languages (i.e. HTML and XHTML). It's less strict but still gets you going in the right direction.

    strict- It's just that, strict. Everything has to be exactly according to w3 standards. This is the most standards compliant way of doing things and, as I see it, the only way coding should be done (unless of course you have frames).

    Hope that helps. I know http://www.w3schools.com has some info on DTD's too if you need more explanation.

    <edit>
    I also found some good info by searching this forum for Document Type Declaration. Rememer, always search first!!
    </edit>
    Last edited by pardicity3; 05-26-2003 at 11:43 PM.
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #3
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The XHTML transitinal DTD, is based on the HTML4.0 transitional DTD, this will support most depricated elements in order to compinsate for older browsers.

    Of course the best way to be sure you are using your DTD correctly is to validate it using the W3C markup validator

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well since I got scared and realised that a topic I posted in is now sticky, I decided to write a little more!

    Actually, I just noticed that there are no links to the actual DTD's anywhere. Here is my rundown:

    XHTML DTD's
    HTML 4.0 DTD's
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #5
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And lets not forget the DTD to the module based XHTML (1.1)
    Modularization takes markup and turns it into 'subsets' or abstract modules
    For example, core modules would be:
    Structural elements, Text containers, Hyperlinking, List oriented elements.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    http://www.w3.org/TR/xhtml11

    <edit>
    And a few side notes:
    the DTD will be placed ABOVE your html element <html>.
    A DTD is NOT a regular element OR a comment tag,
    it's important its not treated like either.
    Also note, its important that DOCTYPE is in caps.
    </edit>
    Last edited by cg9com; 05-24-2003 at 10:05 AM.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #6
    New Coder
    Join Date
    May 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey, (adding a question here ) does it matter if you use a DOC TYPE? I have some sites without a DOC TYPE tag. So do you have to have one or is it just..there? lol
    and- whats the purpose in them?

    thanks - you guys rock

  • #7
    Saj
    Saj is offline
    Regular Coder
    Join Date
    Feb 2003
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, the browser will interpret the markup reardless of a Doctype. The Doctype is used to tell the browser what language is used, and where the base Document Type Declaration (W3's DTD file) is located. However, if you don't use valid code, then adding the Doctype is useless, as your browser uses its own DTD to translate the tags.
    - Saj

  • #8
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts

    wait!

    Originally posted by Saj
    The Doctype is used to tell the browser what language is used, and where the base Document Type Declaration (W3's DTD file) is located.
    This information is called the Document Type Definition

    Also, when adhering to a strict XHTML DTD, there are a few important rules, such as including an XML namespace, etc.

    For more information on the XHTML DTD jargon, refer to this related thread in the XML catagory, as it covers that particular side of the DOCTYPE:
    choose which dtd?

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #9
    giz
    giz is offline
    Regular Coder
    Join Date
    Apr 2003
    Location
    UK
    Posts
    226
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Valid DOCTYPE list.

    List of Valid DOCTYPE statements:

    http://www.w3.org/QA/2002/04/valid-dtd-list.html


    Up to date: published less than 2 months ago.

  • #10
    giz
    giz is offline
    Regular Coder
    Join Date
    Apr 2003
    Location
    UK
    Posts
    226
    Thanks
    0
    Thanked 0 Times in 0 Posts
    pardicity3: Your search ID in the search in your post above has expired.

  • #11
    New Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    skinme.net / v2.php (design nearly completed)

  • #12
    Regular Coder
    Join Date
    Oct 2003
    Location
    The wild blue yonder
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use strict...

  • #13
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Originally posted by cjwsb
    Use strict...
    There are multiple reasons for why you would prefer something other than strict...
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #14
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #15
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    An old thing I compiled some time ago as a response to a question on XHTML-L, that might be useful to you when you want to know whether XHTML1.0 Strict or Transitional is the DOCTYPE for you:
    <http://liorean.web-graphics.com/xhtm...se-strict.html>

    Another a bit more compact resource on the same thing can be found at:
    <http://www.zvon.org/xxl/xhtmlReferen...omparison.html>

    And finally a shorter table that only takes elements and other markup commands into consideration, but doesn't go into depth about attributes:
    <http://www.w3schools.com/xhtml/xhtml_reference.asp>
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  
    Page 1 of 6 123 ... LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •