moving from HTML to XHTML

A

Animesh K

I was thinking to move from HTML 4.01 strict to XHTML 1.0 strict. Is it
worth it? Any advantages if I am going to use AJAX/Javascript heavily? I
heard XHTML has a better (and stricter) document-object model, but I
thought to ask the group before making a move.

By the way, my HTML 4.01 strict layout confirms to w3c and their validators.

Best regards,
Animesh
 
D

David Dorward

I was thinking to move from HTML 4.01 strict to XHTML 1.0 strict.
Is it worth it?

Only if you plan to use mixed namespace documents (which MSIE doesn't
support as webpages).
Any advantages if I am going to use AJAX/Javascript heavily?

No, in fact it complicates things a lot since you can end up writing
different code for modifying the DOM in XML mode (for when you use
XHTML correctly) and HTML mode (for when you pretend its HTML to get
it to 'work' in IE).
I heard XHTML has a better (and stricter) document-object model,

That isn't true. Its weaker if anything. (e.g. the table element no
longer requires rows to be wrapped in a tbody).
 
A

Animesh K

David said:
Only if you plan to use mixed namespace documents (which MSIE doesn't
support as webpages).


No, in fact it complicates things a lot since you can end up writing
different code for modifying the DOM in XML mode (for when you use
XHTML correctly) and HTML mode (for when you pretend its HTML to get
it to 'work' in IE).


That isn't true. Its weaker if anything. (e.g. the table element no
longer requires rows to be wrapped in a tbody).

Thanks for the replies, Toby and David!

I will resist any changes right now and I will continue to use Html 4.01
strict.

I wonder why so many sites are xhtml crazy then (like blogger,
alistapart, and other such).

Thanks again,
Animesh
 
J

Jonathan N. Little

Animesh said:
I wonder why so many sites are xhtml crazy then (like blogger,
alistapart, and other such).

Why are so many *new* sites coded in HTML 3.2?

The answer is the same...
 
D

dorayme

"Jonathan N. Little said:
Why are so many *new* sites coded in HTML 3.2?

The answer is the same...

You mean presumably, it is sheer ignorance. In fact, the reason
for the xhtml craziness is more likely to be a desire to keep to
the "most modern" standard. It is misguided but differently
motivated.
 
A

Andy Dingley

Why are so many *new* sites coded in HTML 3.2?

I thought more of them were still HTML 2 than HTML 3.2 ?

HTML 3.2 requires effort. You have to use obsolete content _and_ you
need to attach a 3.2 doctype declaration.
 
A

Animesh K

Jonathan said:
Why are so many *new* sites coded in HTML 3.2?

The answer is the same...

You mean competent world-popular sites liek blogger are in html 3.2? Any
examples?
 
B

Bergamot

Animesh said:
You mean competent world-popular sites liek blogger are in html 3.2?

There may be some connection between competency and the flavor of HTML
used, but neither affects popularity one iota.
 
J

Juerg Beck

I was thinking to move from HTML 4.01 strict to XHTML 1.0 strict. Is it
worth it? Any advantages if I am going to use AJAX/Javascript heavily? I
heard XHTML has a better (and stricter) document-object model, but I
thought to ask the group before making a move.

By the way, my HTML 4.01 strict layout confirms to w3c and their validators.

Best regards,
Animesh

There is one reason: If you want to display Google maps with overlays
in IE. These are shown only if your page is in XHTML strict.
For this reason I had to change from HTML 4.01 transitional to XHTML
1.0 transitional, to be able to change my page with the google map
just a little bit to reach XHTML 1.0 strict. Not doing it that way had
led to a different layout compared to the rest of the site because I
work a lot with includes in PHP.
BTW: lot of people here in this NG are often complaining about bad
code. What do you think about my code on www.bcbaden.ch ? You will
find the Google maps on www.bcbaden.ch/mapsonnmatt.php
I appreciate any comment. I want to make this site nearly perfect, at
least as the amount of work allows it.
Bets regards
Juerg
 
A

Animesh K

There is one reason: If you want to display Google maps with overlays
in IE. These are shown only if your page is in XHTML strict.
For this reason I had to change from HTML 4.01 transitional to XHTML
1.0 transitional, to be able to change my page with the google map
just a little bit to reach XHTML 1.0 strict. Not doing it that way had
led to a different layout compared to the rest of the site because I
work a lot with includes in PHP.
BTW: lot of people here in this NG are often complaining about bad
code. What do you think about my code on www.bcbaden.ch ? You will
find the Google maps on www.bcbaden.ch/mapsonnmatt.php
I appreciate any comment. I want to make this site nearly perfect, at
least as the amount of work allows it.
Bets regards
Juerg

That was good info. Actually I may need google-maps in one of my future
endeavors, so this information helps a lot.

Best,
A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top