What doc type should your website have? And why is this important?

Discussion in 'HTML & Website Design' started by scutari, May 13, 2008.

  1. #1
    Anyone knowing from this topic, why use transitional xhtml or why not use strict and which is the difference between doc types and which do you recommend?
     
    scutari, May 13, 2008 IP
  2. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    jamesicus, May 13, 2008 IP
  3. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that was a pretty difficult to understand article, please where can i direct for easier information..
     
    scutari, May 13, 2008 IP
  4. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try this: Use the right Doctype

    James
     
    jamesicus, May 13, 2008 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Transitional DOCTYPES allow you to legally (as far as the specification is concerned) use older and obsolete (read: deprecated) code, such as FONT and CENTER tags and the target attribute. If you don't want to use these, then feel free to use a Strict DOCTYPE (I personally use HTML 4.01 Strict and XHTML 1.0 Strict, depending on the needs of the site I'm creating - though 9 times out of 10 I'll go with XHTML that conforms to Appendix C of the specification).
     
    Dan Schulz, May 14, 2008 IP
  6. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well about me using Xhtml transitional or better check by yourself:
    Where should I use this kind of doctype?
     
    scutari, May 14, 2008 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you're going to use an XHTML syntactical structure (like <meta /> or <img /> and need to use older tags and attributes, such as <center></center> and target="" then use XHTML 1.0 Transitional.
     
    Dan Schulz, May 14, 2008 IP
  8. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Oh I just do not use older tags anymore, I only use those from Xhtml like <br />, as I validated my site with w3c
     
    scutari, May 14, 2008 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Since you're using XHTML syntax and aren't using the older tags, then I suggest you go with XHTML 1.0 Strict for your DOCTYPE.
     
    Dan Schulz, May 14, 2008 IP
  10. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    and why is that?
     
    scutari, May 14, 2008 IP
  11. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It makes sense. 1.) You're using XHTML syntax in your code; 2.) you're not using obsolete code.
     
    Dan Schulz, May 14, 2008 IP
  12. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #12
    maybe you are right at this point, cause I copied this from w3 schools, now I understand that they still use tables.So what do you suggest?
     
    scutari, May 14, 2008 IP
  13. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Like I said earlier, I personally use XHTML 1.0 Strict and make sure it validates, using the bare minimum of clean, semantic markup for my structure and CSS for my presentation.
     
    Dan Schulz, May 14, 2008 IP
  14. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #14
    do you mean xhtml for semantic markup?So in general this important because of changes that affect browsers or because SE get you indexed more easily?
     
    scutari, May 15, 2008 IP
  15. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #15
    You can have semantic markup with both HTML and XHTML. The main difference is the syntax (<img> for HTML, <img /> for XHTML, that kind of stuff). My main reason for using XHTML is the syntax - it just makes sense to me that I should close everything I open.
     
    Dan Schulz, May 15, 2008 IP
  16. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I have noticed that using properly XHTML makes my content unique through dreamweaver, IE7 and ff3.
     
    scutari, May 15, 2008 IP