Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML or XHTML 6

Status
Not open for further replies.

TamedTech

IS-IT--Management
May 3, 2005
998
GB
Morning Chapps,

So, new to web development i'v finally started getting my head round things, I now know my way arround CSS pretty well, and i've also learned a reasonable amount of ColdFusion development.

I'm struggling to understand whats so great about XHTML, the obvious answer is that it can presumably achieve more than standard HTML.

For my next site project i'll be powering it using a MySQL Database and ColdFusion. I also want to encorperate a few RSS Feeds, both in and out of my site.

I know nothing of RSS at the moment so that is somthing else i need to learn, i basicly wanted your opinions on whether i need or should be using XHTML or HTML.

Further more, is the markup for XHTML that different? can i still use all my standard HTML features such as DIV's, P's and Headers etc?

Thanks guys,

Rob
 
Ah ... thanks chapps, that was Simple Simon ... i've been conforming all my HTML docs to the W3C standards so it wont take alot to kick them into XHTML.

Thanks for that, purple star each.

Can you point me in the right direction for info on intergrating RSS into my site, i've not been able to find a forum on TT for it.

Thanks,

Rob
 
Rob,

Before you choose to go with XHTML - I strongly suggest you read and digest that link I gave you. Here's an excerpt:

Jeff said:
Unless you are going to be serving your documents as "text/xml" and loading them into an XML parser to allow your XML tools to manipulate the page, then there is no reason to develop your documents as XHTML.

Are you serving your pages as "text/xml"?

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Rob, have a read of the article Dan referenced (about choosing a doctype)... I'm picking there will be no need for you to use an XHTML doctype... it doesn't "offer any more" to you (in terms of the kind of site you have described).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
As to what advantages XHTML has over HTML, the answer is very few unless you have special requirements like including MathML in your pages. As Dan points out, unless you serve up XHTML with the right mime type, you're actually serving (possibly invalid) HTML anyway.

There's some good debate on the matter here: and here:
Personally, I think my next site will be in strict HTML. But I probably won't bother to convert my existing XHTML-as-text/html sites.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Sure thing guys, thanks for that.

I did read through the doctype link that Dan posted. My only thoughts on this was that in the W3C speil they seemed to promote XHTML as the way of the future, creating a cleaner and more efficient web.

As developers should we not be looking to embrace these sort of technologies regardless of thier current benefits to us?

I'm still a little confused about this whole "serving up" issue, whats that all about? i'm guessing that ColdFusion probably 'Serves Up' standard HTML formats? i'm not really that sure about that.

Thanks

Rob
 
Then you're probably better off sticking with HTML strict. You still get to use almost-identical markup to the XHTML pages (so you can close your img, br, hr, etc tags with a /> - but not your meta tags).

This way, when serving web pages as text/xml becomes more commonplace (and more supported), you can simply change the DOCTYPE.

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
As developers should we not be looking to embrace these sort of technologies regardless of thier current benefits to us?
When you are talking about XHTML (over HTML) - the answer is no. Check out this paragraph from that article:
Unless you are going to be serving your documents as “text/xml” and loading them into an XML parser to allow your XML tools to manipulate the page, then there is no reason to develop your documents as XHTML.
Given the limited (self-imposed) length of the article, I don't go into XHTML-M and the various modules... I attempted to write about the "most common scenario" that almost all web sites conform to.

I was in the same position as you before I researched and wrote the article... it took a couple of days to read all the references I found and compile something that was easy to digest. Now I shan't be bothering with XHTML until I deal with a site that has some specific requirement (such as playing with XML doms and the like).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Ok guys that makes sense, HTML Strict it is then.

As suggested by Dan I can easily knock it over to XHTML at a laster date if i'm going to be serving my documents as “text/xml” and loading them into an XML parser to allow my XML tools to manipulate the page. lol

Oh I love web devleopment, everyday brings a new confusion.

Thanks guys, you've been a super sized help.

Rob
 
One of the best posts I've read - civil, to the point, and answering a question I've had in the back of my mind for some time.

Thanks to Rob for the question, and all of the answerers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top