10 replies [Last post]
larmyia
Offline
Elder
London
Last seen: 13 years 42 weeks ago
London
Timezone: GMT+1
Joined: 2005-01-25
Posts: 1060
Points: 0

I've been thinking a lot lately about the difference between xhtml 1.0 and html 4.01. reading up on w3c schools I'm still not 100% sure. why aren't we all using it now? I understand the thinking behind the development of xhtml. is it not well supported? it didn't say, but I gather it's not supported by older browsers?

so, I'm thinking, code my html like it's xhtml - make the transition when the time comes much easier.

currently I'm using a transitional doctype, for no other reason than it's the first one I saw when I started reading up about doctypes (I think there was a link at the bottom of one of tph's post - no surprise there then!). so, I'm thinking that maybe I should move to strict...but what are the consequences of this? are there any? should I already be doing this? on the w3c they said they used transitional as strict was too difficult for them to conform to. if they can't..can I? or is it because their site is massive?

just a few thoughts of mine, but I'd appreciate any of yours Laughing out loud

thanks

larmyia

Tags:
Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 weeks 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

xhtml v html

Hi larmyia,
The w3c is large and has been around for a long time.
Many of the older pages would need to be updated to move to strict XHTML.

The main difference between HTML and XHTML is that many elements that don't require a closing tag in HTML do in XHTML.

There was a great topic here about this a couple of months ago.

Hope that helps

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 25 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

xhtml v html

Now here's a topic of much confusion and one that can make your head hurt Smile

Hear are a few links to read, the first one is interesting as in the first post it quotes an article on Doc Types then at the end of the thread you will see that one of the original contributors happened across the posting and went on to explain how he had been quoted out of context (not by our member) somewhat and clarified a few points.

http://www.csscreator.com/css-forum/ftopic4871.html

This second thread rambles a bit and was not specifically about Doc types but does drift into that area :oops: and has a few points of interest.
http://www.csscreator.com/css-forum/ftopic6836.html

The third is a one of the W3C better written pieces on serving up xhtml and is worth a read ( also follow the links in the body text at the top )
http://www.w3.org/International/articles/serving-xhtml/

I also updated recently the piece I did on standards in the 'How to' section with some examples of switching modes with different DTD definitions. Many may not be aware that Mozilla is very particular as to DTD and also has a render mode called 'Almost standard Mode' which is actually what most of us are working with when using a transitional definition.

fwiw; your best of using a strict definition with a full system indentifier (url) as this will provide best standards rendition across browsers, but not xhtml 1.1 as this is a strictly xml format and shouldn't be used along with text/html mime type as it needs the xml prolog and mime type and is for browsers that can parse xml which IE can't.

Happy reading Smile

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

larmyia
Offline
Elder
London
Last seen: 13 years 42 weeks ago
London
Timezone: GMT+1
Joined: 2005-01-25
Posts: 1060
Points: 0

xhtml v html

those links were most interesting Hugo (and I was greatly amused with your persistence in the 2nd one to discuss this matter!).

the gist as I understand it is to use xhtml 1.0 (strict) with text/html and look towards a brighter future of xhtml 1.1 with application/xhtml+xml?

one other thing........maybe I should post this in another post? what does *metta http-equiv="Content-Type"* and *charset=iso-8859-1* actually mean and what does it actually do? i put this stuff in my code and am not sure why.

Tony - when reading through the xhtml tutorial on w3c they said that when they updated all their pages to xhtml they decided to use transitional as they couldn't conform to strict. I guess you're saying that they didn't update all pages and therefore transitional was the answer?

off to read the final article from w3c.

thanks

larmyia

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 25 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

xhtml v html

Laughing out loud I did bang on a bit :oops: "no but, really but, yes but, no I must insist you let me take this right off topic and bore you to tears"

Re-reading it the poster was I think making some repeated errors in his thinking of doc types and their implementation, but it was reprehensible of me to divert from the original question. Do you get the impression he may have become slightly fed up with me ? Smile

The meta character set definition tells the browser which character set to use for the interpretation of the page and is required.

The charset=iso-8859-1 is the latin iso set and is a popular standard to use which covers most Western languages although it will and should be superseded by the utf-8 set which was designed to be universal.

Here is a very good tutorial on character encoding covering the history of the standards from ASCII, ISO to utf-8 , make note of Microsofts(Windows character set) non standard use of reserved numbers that shouldn't be used in pages .

http://www.cs.tut.fi/~jkorpela/chars.html

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

larmyia
Offline
Elder
London
Last seen: 13 years 42 weeks ago
London
Timezone: GMT+1
Joined: 2005-01-25
Posts: 1060
Points: 0

xhtml v html

Hugo wrote:
Do you get the impression he may have become slightly fed up with me ? Smile

slightly? more than slightly Laughing out loud hehe. no one can doubt your persistance on the topic (even if it's not the one at hand! hehe). tho I do agree, he did have a few errors in his thinking.

it appears to me that sometimes people get very wrapped up in what should "ideally" be done and don't think about the whole picture.

thanks for the link. will read it at my leisure.

larmyia

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 10 weeks 11 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

xhtml v html

Quote:
(I think there was a link at the bottom of one of tph's post - no surprise there then!)

Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 25 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

xhtml v html

Oh yeah, and when did TPH steal my Doc Type obsessives crown Oups

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

larmyia
Offline
Elder
London
Last seen: 13 years 42 weeks ago
London
Timezone: GMT+1
Joined: 2005-01-25
Posts: 1060
Points: 0

xhtml v html

boys, can't you share?

Wink

Hugo, you do it in a more gentle manner...tph just popped in my head after his dtd nazi post.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 25 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

xhtml v html

Smile O:)

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 10 weeks 11 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

xhtml v html

:twisted:

Steady on lads, lets get back on topic.

To paraphrase Bender:

Quote:
I prefer xHTML. The 'X' makes it sound cool Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies