SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    will i run in to any problems using this? DTD

    hi all
    and before anybody says yes ive red the xhtml vs html above. just want some personal feedback, thanks!

    im curently using:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    just been doing a little reading about ie7 beta 3.

    my site is made up of purely css, php, mysql. i was just wondering if i switch to:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">

    how will this affect me? im thinking at the moment that this DTD is going to be more reliable and a safer choice were IE is concerned anyway?

    BASICALLY: will i run into any problems if i make the switch???

    what can i do? and what cant i do? and will i have to delete all the spaces at the end of my code?

    <link href="structure.css" rel="stylesheet" type="text/css" />

    thanks every1 !!!

  2. #2
    SitePoint Evangelist gollux's Avatar
    Join Date
    Feb 2005
    Location
    Oregon, USA
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To avoid quirks mode, you will probably want the whole thing, the shortened ones for strict sometimes don't have the desired effect.

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

    Seems to be working fine for what I'm doing.

    Follow the usual things like tags in lower case, attributes enclosed with quotes. If you are overly concerned with having one of those validators work mostly then you might have to worry about the /> thing, but I haven't seen it effect how the browser parses the code.
    Released under the Fiasco Labs Digital Damnation Copywright,
    it's yours to make whatever the 7734 you want with it.

    (c) 2005 Fiasco Labs All Wrongs Reserved

  3. #3
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Transitional doctypes are used for transitioning from older code to a letter of the law type of coding. You must follow the rules exactly while transitional will allow certain things to pass through which arent strictly allowed.

    ALL new pages should be coded with a strict doctype. Why are you using transitional?

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should definitely use a Strict doctype, not a Transitional one. Transitional is not meant for creating new documents.

    You should also use HTML 4.01, not 4.0. HTML 4.0 contains a number of errors and omissions that were rectified in 4.01.

    You need to remove the slash before the '>' in all self-closing tags if you switch to HTML.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks every1! cleared a few things up for me anyway.

    Why are you using transitional? [ drhowarddrfine ] ive been using dreamweaver, it just used this when i created a new page, only relasied when i done a bit of reading..

    thanks gollux ..

    so ill be safe using
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    HTML Code:
    TR/html4/strict.dtd ( should that be ) TR/html4.1/strict.dtd   ??
    so im going to use:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    along with:
    HTML Code:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    so all together it looks like this:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    does this look right then?? thanks again everybody!!! CHEERS!!!

  6. #6

  7. #7
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for that Dark!

    just back to this tho:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
    <link href="structure.css" rel="stylesheet" type="text/css" />
    <link href="appearance.css" rel="stylesheet" type="text/css" />
    is this right?

    and do i need to get rid of ( "text/css" /> to "text/css"/> or "text/css"> if so dont i need a </a> ?? )

    thanks every1!!!!!

  8. #8
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Change "/>" to ">", then it's correct.
    Simon Pieters

  9. #9
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers zcorpan!! dont i need a </a> ?? then?

    thanks again!!

  10. #10
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    You need to remove the slash before the '>' in all self-closing tags if you switch to HTML.
    The <a> tag is not self-closing, so you need always </a> to close your links. Examples of self-closing tags: <link>, <meta>, <img>, <br>. If you are coding in XHTML, you need to close those tags as well (e.g. <link />) but not in HTML.
    Dan G
    Marketing Strategist & Consultant

  11. #11
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so this that iam using now, wont i need to delete change /> to > because arnt selfclosing tags just xhtml? and this is a html 4.1 strict

    HTML Code:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="structure.css" rel="stylesheet" type="text/css" />
    <link href="appearance.css" rel="stylesheet" type="text/css" />
    thanks all!!!!!!!

  12. #12
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, remove the slash.

  13. #13
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks drhowarddrfine !!

  14. #14
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1 last thing! what if all my pages are .php will this affect this setup in anyway?

    cheers!!

  15. #15
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no
    Dan G
    Marketing Strategist & Consultant

  16. #16
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks every 1!!


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
  •