SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict dbr's Avatar
    Join Date
    Aug 2006
    Location
    Tucked away in the mountains...
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question DTD Doctype Question for Professional HTML Handcoders

    Those who code html strictly by hand,
    1. how do you determine your Doctype?
    2. do you consistently place the Doctype at the beginning of every page?
    3. do you use this site http://validator.w3.org/ to validate your code before publishing?

    Thanks to all who reply. I'm trying to cleanup my act

    Dave
    "Three components make an entrepreneur:
    the person, the idea, and the resources to make it happen."
    Anita Roddick ~British entrepreneur
    dbr founder of: ProximityCast.com

  2. #2
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No I don't put it there. I have Dreamweaver stick it there for me. I just tell it to make the page XHTML 1.0 strict and it sticks the doctype in there. And yes the validator web site is the bomb.

  3. #3
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,751
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. how do you determine your Doctype?

    Depends on the content of the page. There's 2 sides to this one. First off is the XHTML side, which is where everyone will say "Use XHTML Strict". However, another side notes that IE can't accept application/xml or whatever the other mimetype for xhtml is. They generally recommend just standard "HTML 4.01 Transitional" or so.

    Note that frames require a frameset DTD.

    2. do you consistently place the Doctype at the beginning of every page?

    If you want your pages valid yes.

    3. do you use this site http://validator.w3.org/ to validate your code before publishing?

    Yes, though you can generally find plugins to automate the process. In the end though, they should validate through the w3.org site.

  4. #4
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1> X Strict when possible, but I'll switch to Tranny if something browser specific just doesn't work... (kinky...)

    2> That's WHERE IT GOES, as Chris said, if you want your page to be VALID

    3> Of course - I actually code for Opera first (though I usually have IE and FF open as well) which for me means a simple CTRL-ALT-V

    That's right, Opera has a keyboard shortcut to send for validation BUILT IN... AND it sends the code it recieved from the server to them instead of the URL, meaning you can validate anything the browser can see (great for the differences between being logged into a site and not) and even local files.

    But like most other things people use addons for in other browsers, Opera already has it... and usually had it first...

    ... and as I've said a couple times already 80% or so of the posts on the web page design forums could be avoided by simple validation. (and about 15% could be avoided by using simpler/more compatable code INSTEAD of browser specific conditionals and hacks)

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I presume this thread is about text/html pages.
    Quote Originally Posted by dbr
    1. how do you determine your Doctype?
    The renderingmode I want determinates the choice of doctype (or lack thereof). Mostly I want Full Standards mode, so <!doctype html> will do. If I want the page to pass DTD validation without doctype override I use the HTML 4.01 Strict doctype (usually without system id).
    Quote Originally Posted by dbr
    2. do you consistently place the Doctype at the beginning of every page?
    Yes, otherwise you get Quirks mode.
    Quote Originally Posted by dbr
    3. do you use this site http://validator.w3.org/ to validate your code before publishing?
    No, not always. When I do, I use the doctype override feature and validate against HTML 4.01 Strict.
    Simon Pieters

  6. #6
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I usually use XHTML 1.0 Strict, but, like deathshadow, I'll sometimes use XHTML 1.0 Transitional if I have to use a depreciated element or attribute (target usually being the culprit). I don't use frames, so frameset DOCTYPES are out of the question, and I'll only use HTML 4.01 if someone requires that I do so.

  7. #7
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dbr
    Those who code html strictly by hand,
    1. how do you determine your Doctype?
    2. do you consistently place the Doctype at the beginning of every page?
    3. do you use this site http://validator.w3.org/ to validate your code before publishing?

    Thanks to all who reply. I'm trying to cleanup my act

    Dave
    1. Good question. Many clients do not want HTML 1.0 strict for marketing reasons (or perhaps bandwagon thinking that XHTML is supposedly superior to HTML which it isn't as it's essentially the same, only not as clean as HTML since we have to use XHTML markup on a HTML document which serves little to no purpose). Another factor are third party applications (such as CMSes). If these use XHTML strict for, say their output in comments and other things and do not offer HTML equivalents, I'll resort to choosing the XHTML 1.0 strict doctype. Else, I'll use HTML strict 1.0. However, I always use a strict DTD without exception.

    2. Yes. Unless I were to use real XML which I don't as IE does not support it.

    3. Yep, I do.


    Maleika E. A. | Rockatee | Twitter | Dribbble



  8. #8
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dbr
    1. how do you determine your Doctype?
    Do I need to use elements from other XML namespaces? Then use XHTML 1.0 Strict.
    Is the page intended for a general audience (read: must it work in IE)? Then use HTML 4.01 Strict.

    Quote Originally Posted by dbr
    2. do you consistently place the Doctype at the beginning of every page?
    Of course.

    Quote Originally Posted by dbr
    3. do you use this site http://validator.w3.org/ to validate your code before publishing?
    Yes.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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