Mixing doctypes

J

JWL

Hi

Is it OK to mix doctypes on the same site, just to get everything to
validate? For example, my site is in strict HTML but HTML injected by
FCKEditor is using the width attribute on tables etc., which of course
won't validate as strict HTML. If I stick a loose DTD on that page, it
will validate but is this a good thing to do?

Thanks
 
A

Andy Dingley

JWL said:
Is it OK to mix doctypes on the same site, just to get everything to
validate?

Absolutely. HTML only has the scope of one "page" at a time.
 
N

Nikita the Spider

JWL <[email protected]> said:
Hi

Is it OK to mix doctypes on the same site, just to get everything to
validate? For example, my site is in strict HTML but HTML injected by
FCKEditor is using the width attribute on tables etc., which of course
won't validate as strict HTML. If I stick a loose DTD on that page, it
will validate but is this a good thing to do?

It's OK to have multiple doctypes on one site. In fact, most sites do.
However, the one really shouldn't be creating new pages with the
transitional DTD. That DTD was meant to allow HTML authors to write
valid pages while coping with the browsers of that time (seven years
ago!) which were not so CSS savvy. Nowadays new pages really ought to be
strict, not transitional. So the best solution would be to get an editor
that doesn't create gunky HTML for you, but I realize that that wasn't
the question you asked. =)
 
D

David Dorward

JWL said:
Is it OK to mix doctypes on the same site,
Yes.

For example, my site is in strict HTML but HTML injected by
FCKEditor is using the width attribute on tables

So when it submits the markup to the server, strip out the presentational
junk.
 
J

JWL

David said:
So when it submits the markup to the server, strip out the presentational
junk.

Hmm. But the presentational junk is the whole point in using the editor,
is it not? Otherwise I could just use a textarea.
 
D

David Dorward

JWL said:
Hmm. But the presentational junk is the whole point in using the editor,
is it not?

I thought it was to provide a point and click interface for adding headings,
empthasis, links and so on.
 

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top