Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Apr 2003
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XHTML 1.0 Strict, what do I need?

    Hello all,

    I have been using the following doctype for my webpages recently, and all is working fine.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    Yet, I have stumbled upon a few other things too, such as the <?xml.... tag preceding that. What does it do? I was always under the impression a DOCTYPE has to come first? How about usability and portability between browsers?

    Another thing.. the html tag. I have seen the xmlns attribute, and W3Schools revealed to me that it is a fixed value, and does not HAVE to be included. Yet, is it preferable to include it anyway, as I see it being done alot? And how about the xml:lang attribute mentioned there?

    These are a lot of questions, but I just can't find any websites that explain it to me in a way that I can understand, especially due to the fact I am quite inexperienced with the more technical sides of XML. To me, it appears like it is saying 'this is xhtml' in a dozen different dialects! (I know, I am hopeless at times... I have to know the details... )

  • #2
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Please Read all
    XHTML 1.0 STRICT

  • #3
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Don't put in that xml prolog. It throws IE into quirks mode wich you don't want.
    CATdude about IE6: "All your box-model are belong to us"

  • #4
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by iota
    Please Read all
    XHTML 1.0 STRICT

    I can't think of a faster way to put people off of using xhtml that suggesting or expecting that they should read the raft of w3c documents on the subject.
    I've never read any of those documents right through and only even looked at them after already familiarised myself with xhtml. They are painfully dry and not something I'd recommend to someone new to markup (of any variety).

    For my money, the w3schools site is considerably better presented to help (normal) people develop an understanding of xhtml. Doggo18 has already stated that they have found some sources hard going, so I don't think the W3C site is going to be an improvement.

    Fwiw, Sitepoint.com is a well-maintained site with some articles that you may find worthwhile and easier to grasp.
    e.g. http://www.sitepoint.com/article/xht...-beginners-2/2

    There are also a number of articles on issues that complement xhtml, such as accessibility and css-based layouts.

    xhtml will be the hub of a range of good coding coding practices and you should take this opportunity to develop a good understanding (and hopely an appreciation for) 'semantic' markup.


    Links worth checking out:
    http://www.xml.com/pub/a/2000/11/01/semanticweb/
    http://www.sitepoint.com/article/ess...ern-web-design
    http://www.motive.co.nz/glossary/markup.php
    http://www.sitepoint.com/article/tables-vs-css
    http://mezzoblue.com/downloads/markupguide/
    http://www.yourhtmlsource.com/access...explained.html
    'xhtml' @ alistapart.com

    http://www.accessify.com
    http://diveintoaccessibility.org/


    It's also worth knowing about the mime-type implications of using xhtml markup, but don't necessarily get yourself hog-tied by the concept of the all or nothing attitude, which some have…
    http://www.w3.org/2003/01/xhtml-mimetype/

    The Hixie article is worth reading as it goes to some length to create a worst case scenario regarding the transitional from XHTML markup served as text/html to serving it as application/xhtml+xml, but don’t be swayed by it’s conclusion - namely that serving xhtml markup is harmful.
    The technical aspects of the article are sound, but the editorial viewpoint is, imho, not only flawed and sensationalist, but counterproductive to general progress in web development.

    Anyhoo, … www.hixie.ch/advocacy/xhtml

    Yes, it's certainly worth knowing about these issues, but once you are aware, youll realise how simply it is to stay out of harm’s way if/when you complete the xhtml transitional by serving your markup with the ‘ideal’ mime-type.
    Certainly don't let it put you off using methods which work with text/html in the meantime. Just be aware.
    (Fwiw, it's not "harmful" to serve xhtml markup as text/html, but it is naive to assume that text/html-compatible methods will automatically work when serving the markup as application/xhtml+xml.)

    You can bypass most of the concerns by getting to grips with w3c DOM-based javascript methods, though predictably, you may find support still lacking in some browsers, potentially forcing you to revert to methods which work in text/html but not application/xhtml+xml.

    Incidentally, if using javascript, it's worth reading up on the notion of ‘unobtrusive javascript’, which in essence is the implementation of javascript in ways that suppliment and enhance a site’s basic accessibility and usability, i.e. not using it to deliver essential content or to provide the only means of navigation.
    Here’s a worthy article: http://www.onlinetools.org/articles/...ivejavascript/

    You would do well to subscribe to the RSS feeds from a number of good sites which provide articles (and links to other articles) which will help you develop a basic understanding of xhtml and the surrounding issues as well as to help you to continue to develop your understanding and proficiency in its use.

    Any of the following sites would be a good place to start…
    www.456bereastreet.com
    www.mezzoblue.com
    www.alistapart.com
    www.simplebits.com
    www.stopdesign.com
    www.mikeindustries.com


    Finally, here's a centralised page/resource containing links to some of the more useful online sites and resources that a progressive web developer is likely to appreciate.
    http://www.alvit.de/handbook/


    hth
    Last edited by Bill Posters; 08-09-2005 at 01:10 PM.

  • #5
    New Coder
    Join Date
    Apr 2003
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    mrruben5: That was very useful to know, thank you. Exactly one of the things I wanted to know.

    Bill Posters:

    I am already quite familliar with tableless layouts, and the proper usage of XHTML and CSS. It is just the more technical details that I am wondering about. Some of the links you posted were useful, others I had read a long long time ago already. In any case, I appreciate the huge post. The part about mime types is intruiging too, but it isn't what I was after.

    So, basically what I gather so far:

    Don't use the <?xml prolog.

    How about the html tag?

    <html xmlns="..." xml:lang="..." lang="...">

    I am still confused as to the difference between xml:lang and lang, as well as the fact is they are required, and whether xmlns should or should not be included.

    Thanks.


  •  

    Posting Permissions

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