1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do I know which doctype to use?

Discussion in 'HTML & Website Design' started by master-yoda, Jan 21, 2010.

  1. #1
    master-yoda, Jan 21, 2010 IP
  2. jibin

    jibin Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This page has some problems, the template is all broken up..(i tried it in firefox, chrome and ie) there are no background images in the template. i think its better to follow div layouts...:)
    all d best!

    If u r good in html, and css try strict or Transitional doctype
    Loose will afford minor errors, perfect choice for newbies...
     
    Last edited: Jan 21, 2010
    jibin, Jan 21, 2010 IP
  3. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #3
    that depends on what machines you are targeting. if you are targeting mobile devices you have to do strict I think. otherwise transitional is fine.
     
    webcosmo, Jan 21, 2010 IP
  4. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #4
    theapparatus, Jan 21, 2010 IP
  5. hartwm

    hartwm Member

    Messages:
    141
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #5
    transitional xhtml
     
    hartwm, Jan 21, 2010 IP
  6. hartwm

    hartwm Member

    Messages:
    141
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #6
    by the way, you know your navigation changes from the home page to the other pages, which is really bad UX
     
    hartwm, Jan 21, 2010 IP
  7. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Always use a strict Doctype (to avoid deprecated elements and attributes) -- presently use HTML 4.01. Refer to this page for information relating to why not to use XHTML 1.0.

    Visit this page for a really in-depth examination of Doctype selection.

    James
     
    jamesicus, Jan 21, 2010 IP
  8. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #8
    always use strict from the very start
     
    myst_dg, Jan 21, 2010 IP
  9. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Amen to Strict. Who said the validator was dropping to Transitional?? The validator willl validate any doctype (except it has trouble with html5).

    HTML4.01 Strict for 99% of sites is fine. However, write it as if it were XHTML. Don't skimp.
     
    Stomme poes, Jan 21, 2010 IP
  10. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #10
    And if you had actually followed the link that I give, you would have understood why the validator was dropping down to Transitional as it told you why it was doing so.

    *sigh* Yup, it's DP.
     
    theapparatus, Jan 22, 2010 IP
  11. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I was under the impression that you were saying the validator itself or those who developed it were recommending people use Transitional which is not true.

    If you meant that his doctypeless site was "dropping down" (down from what? nothing?) to HTML4 Transitional, then you're still confusing me, because for me the direction is not "down".

    Then again Engrish is a funny language where people can go either "up" or "down" a street while remaining completely horizontal :/

    *sigh* DP people and their Engrish.
     
    Stomme poes, Jan 22, 2010 IP
  12. 1945

    1945 Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I suggest you to use this script

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"> :D
     
    1945, Jan 22, 2010 IP
  13. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Yes, Sp is correct. The point is that XHTML served as content type text/html (which is the way 99% of XHTML pages are actually being served) is really just HTML anyway (they must be served as content type application/XHTML+XML to be real XHTML pages) so why do all the extra typing involved in using XHTML Doctypes/headers, closing empty elements, etc.?

    The HTML 4.01 Strict Doctype is simple:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    Of course, the well-formedness principles inherent in XHTML (using lowercase for elements/attributes, nesting elements correctly, quoting attribute values, structuring documents through proper use of headings ..... and so on) are essential -- but they should be always employed anyway regardless of the document designation.

    James
     
    jamesicus, Jan 22, 2010 IP