moving from HTML to XHTML

moving from HTML to XHTML

am 12.06.2007 21:32:10 von Animesh Kumar

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

Re: moving from HTML to XHTML

am 13.06.2007 00:29:02 von Toby A Inkster

Animesh K wrote:

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

Almost certainly not.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 109 days, 6:13.]

URLs in demiblog
http://tobyinkster.co.uk/blog/2007/05/31/demiblog-urls/

Re: moving from HTML to XHTML

am 13.06.2007 10:49:32 von dorward

On Jun 12, 8:32 pm, Animesh K wrote:
> 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).

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: moving from HTML to XHTML

am 13.06.2007 20:41:15 von Animesh Kumar

David Dorward wrote:
> On Jun 12, 8:32 pm, Animesh K wrote:
>> 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).
>
> --
> David Dorward
> http://dorward.me.uk/
> http://blog.dorward.me.uk/
>

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

Re: moving from HTML to XHTML

am 13.06.2007 22:09:20 von lws4art

Animesh K wrote:

> 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...
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Re: moving from HTML to XHTML

am 14.06.2007 02:48:25 von dorayme

In article <86454$46704f14$40cba7cd$23488@NAXS.COM>,
"Jonathan N. Little" wrote:

> Animesh K wrote:
>
> > 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...

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.

--
dorayme

Re: moving from HTML to XHTML

am 14.06.2007 11:05:40 von Andy Dingley

On 13 Jun, 21:09, "Jonathan N. Little" wrote:

> 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.

Re: moving from HTML to XHTML

am 14.06.2007 20:33:07 von Animesh Kumar

Jonathan N. Little wrote:
> Animesh K wrote:
>
>> 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...

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

Re: moving from HTML to XHTML

am 15.06.2007 00:02:21 von Bergamot

Animesh K wrote:
>
> 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.

--
Berg

Re: moving from HTML to XHTML

am 16.06.2007 09:01:56 von Juerg Beck

On Tue, 12 Jun 2007 12:32:10 -0700, Animesh K
wrote:

>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

--
Posted via a free Usenet account from http://www.teranews.com

Re: moving from HTML to XHTML

am 18.06.2007 21:09:42 von Animesh Kumar

Juerg Beck wrote:
> On Tue, 12 Jun 2007 12:32:10 -0700, Animesh K
> wrote:

>
> 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