which DOCTYPE to use

Discussion in 'HTML & Website Design' started by steve_gts, Sep 17, 2005.

  1. #1
    Hi All,

    I have just run a check on my site and it's telling me that I need a doctype at the start of my code. I am new to web dev so did a bit of research and came up with 6 different bits of code I can use.

    Strict
    Transitional
    Frameset

    and these are available in XHTML 1.0 and 4.01 (i think)

    Any chance someone could have a quick look here: http://www.ledgerservices.co.uk and tell me which one I need?

    Thanks for any help!

    Steve
     
    steve_gts, Sep 17, 2005 IP
    Willy likes this.
  2. Willy

    Willy Peon

    Messages:
    281
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Since XHTML Strict would need your page to validate as XHTML, and XHTML Frameset is for frameset pages only, I was going to say go with XHTML Transitional, but unfortunately your site is still using the <font> tags, so I think you need to take one more step down, and use HTML 4.01 Transitional:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
    Code (markup):
    It's probably a good idea to learn some CSS, and then you can separate your content and presentation to a larger degree and join the brave new XHTML era ;)
     
    Willy, Sep 17, 2005 IP
  3. steve_gts

    steve_gts Active Member

    Messages:
    1,170
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Hi Willy,

    Thank you for that, I'm very new to this (got my copy of FP about a month ago) so am just letting FP2003 create my code for me as I do not have a clue how it all works at the moment!

    I have been told that it's not the best editor to use but I have it now, and it seems there is sooooo much else to learn that unless it will have a detrimental effect on my search rankings I will just have to live with it for a while untill I get my head round the whole web development concept a bit more.

    Had a look at the CSS link and that confused me even more !!! lol

    Thank you for your help
     
    steve_gts, Sep 17, 2005 IP
  4. Willy

    Willy Peon

    Messages:
    281
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, I can imagine there's a lot to learn, starting fresh :D ...I've been at it since '95, myself, so have had the chance to pick things up more gradually.

    Don't sweat XHTML & CSS just yet, then. At some point, just upgrade to a newer FrontPage (which hopefully will support these newer standards) or maybe think about Macromedia Dreamweaver which is sort of the "professional's FrontPage" in a sense.

    You'll eventually have to mess around with source code at some point and can learn the concepts one by one when you need to ;)
     
    Willy, Sep 17, 2005 IP
  5. steve_gts

    steve_gts Active Member

    Messages:
    1,170
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    80
    #5
    I put that code at the top of the homepage, but now when I run a check it is saying "This page is not Valid HTML 4.01 Transitional!"

    do I need to change something else on the page or should I just ignore that comment? it is comming from the report on http://validator.w3.org/

    Thanks
     
    steve_gts, Sep 17, 2005 IP
  6. Willy

    Willy Peon

    Messages:
    281
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Might be that FrontPage is generating even older code. You could look at HTML 3 or HTML 2 doctypes, but IMHO just ignore it for now. If your page doesn't validate as XHTML anyway, there's not much point putting effort into something as abstract as that. Just check that your site looks OK in Windows with Internet Explorer, Firefox/Mozilla/Netscape, Opera, and if you have access to any Apple Mac computer check that separately as well.
     
    Willy, Sep 17, 2005 IP
  7. steve_gts

    steve_gts Active Member

    Messages:
    1,170
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    80
    #7
    OK, thats what I was hoping you would say :)

    Thanks for all your help, I'm sure I'll be back with more questions soon.

    Cheers,
     
    steve_gts, Sep 17, 2005 IP
  8. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Check out doctype to learn how to automatically make Frontpage add the DOCTYPE to your webpage
     
    Corey Bryant, Sep 17, 2005 IP
  9. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #9
    1. FrontPage 2003 IS the latest version.

    2. Don't stress about whether your page "validates". That really won't buy you much of anything - just make sure you test the page in alternate browsers to ensure it's at least readable in Netscape, Firefox, etc.
     
    minstrel, Sep 17, 2005 IP
  10. maro

    maro Peon

    Messages:
    356
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I have never used DOCTYPE I don't know but I am not sure if it has any effect on anything! Do search engines look for this? How does it effect the site?
     
    maro, Sep 18, 2005 IP
  11. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #11
    http://msdn.microsoft.com/library/d...c_fp2003_ta/html/odc_fpWorkingWithDocType.asp
     
    fryman, Sep 18, 2005 IP
  12. maro

    maro Peon

    Messages:
    356
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thanks for the clarification fryman...
    So any link explaining different DOCTYPEs and when/how should they be used?
     
    maro, Sep 18, 2005 IP
  13. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #13
    I already posted it :rolleyes:
     
    fryman, Sep 18, 2005 IP
  14. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Corey Bryant, Sep 18, 2005 IP
    steve_gts likes this.
  15. steve_gts

    steve_gts Active Member

    Messages:
    1,170
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    80
    #15
    So should it be at the start of every page or just the index?

    Thanks
     
    steve_gts, Sep 20, 2005 IP
  16. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #16
    Every page.

    Think of it as "instructions to browsers on how to interpret this page". Then it becomes clear - you need it on every page you want "interpreted" (rendered) correctly.

    Leaving it out doesn't break the page but it does leave it up to individual browsers to "decide" how to render it, and not all browsers make the same decisions in that respect. Thus, the main purpose of the DOCTYPE declaration is to increase the uniformity with which different browsers interpret that page.
     
    minstrel, Sep 20, 2005 IP
    steve_gts likes this.