Forum Moderators: mack

Message Too Old, No Replies

XHTML or HTML?

What are newcomers using?

         

DavidS

7:26 am on Dec 30, 2006 (gmt 0)

10+ Year Member



I went into the HTML and BROWSER's forum lastnight and other various places over the net about whether to use html or xhtml. This is a dilemma for someone like me who doesn't quite understand some of the terms and concepts they are talking about in this forum. Plus, the latest I can find on this debate is April this year, and most in this forum lastnight were advocating HTML 4.01, but some weren't. They were basing a lot of their support off a document which is over two years old now and were talking about things such as IE not supporting the xml processing declaration at the top of an xhtml document. I read in the msdn library yesterday, that MS has made changes so that IE7 caters for this. MIME type is another thing which is an issue which I am yet to look up.

I just want to know what a lot of the "newcomers" are doing about this and what are they using before I start hooking in.

thanks

DavidS

7:57 am on Dec 30, 2006 (gmt 0)

10+ Year Member



Ok, I found a later post in the HTML and BROWSERS forum dated November 15th. I'm a three day old web programmer which means I haven't built a website yet. I'm poised to start with html 4.01 strict instead of xhtml. I'm just going to find some info on the html 5.0 initiative first.
regards

encyclo

7:47 pm on Dec 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld DavidS!

Yes, in general, there is very little reason to use XHTML today. The most robust and best-supported standard today (and the one recommended by browser makers such as Firefox) in HTML 4.01 Strict. You can also choose HTML 4.01 Transitional, which is useful if you want your page to validate and you need to use some presentational HTML not present in the strict version.

Some prefer to use XHTML 1.0 syntax instead, but serve it as HTML (the mime-type issue you were mentioning earlier). You shouldn't try to serve XHTML as anything other than

text/html
(the standard HTML mime type) for compatibility reasons. "HTML5" is only in development stage, and shouldn't be used on the public web at the time of writing.

If you like the XHTML syntax better, then it's not a problem. It's a good idea to make sure you are always building pages in Standards-compliance mode in the browser - which means putting a full doctype on the very first line of each document.

A few threads you might find useful:

  • Quirks Mode vs. Standards Mode - overview [webmasterworld.com]
  • FAQ: Choosing the best doctype for your site [webmasterworld.com]
  • Why most of us should NOT use XHTML [webmasterworld.com]
  • Reinventing HTML - W3C to restart HTML development [webmasterworld.com]

    The most important thing is to put your users first. Don't get too stuck in the minutae of the standards debate, and just make sure that you are building a clean and robust framework for your site content. You're very welcome to post here on in the HTML and Browsers [webmasterworld.com] forum with any questions you may have when building your site. :)

    Oh, and I almost forgot a link to a vital tool to help build a good site: the HTML validator:

    [validator.w3.org...]

    Use early and often, it's a great way of checking for syntax errors on your pages.

  • DavidS

    11:09 pm on Dec 30, 2006 (gmt 0)

    10+ Year Member



    that's an awesome response.
    thanks for that encyclo.
    I will read these links and make a decision today.

    MichaelBluejay

    4:10 am on Jan 1, 2007 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    (Nominating this thread as a front-page Featured Post, and for the Library.)

    schulerlab

    8:42 pm on Jan 15, 2007 (gmt 0)

    10+ Year Member



    Henri Sivonen has updated his DocType /Browser table with IE7 information:

    Activating the Right Layout Mode Using the Doctype Declaration
    [hsivonen.iki.fi...]