Forum Moderators: open

Message Too Old, No Replies

Making document valid HTML 4.01 and XHTML 1.00 is it possible?

         

orion_rus

8:31 am on Jan 3, 2005 (gmt 0)

10+ Year Member



I'm using <meta> tag
but if i use<meta htt p........ content.....>
it's valid to HTML 4.01 but not to XHTML 1.00
if i use <meta htt p........ content..... />
it's valid to XHTML 1.00 but not to HTML 4.01
can i make it valid to both standarts?

tedster

5:38 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can close your meta tags with </meta> instead of using <meta /> - but other so-called "empty tags", most notably <br /> should be closed as I've written.

I'm curious - why do you want to achieve dual validation? Your document should have only one DTD no matter what. So strictly speaking you cannot "validate" to two standards.

cyead

11:42 am on Jan 3, 2005 (gmt 0)

10+ Year Member



i think you have to leave a space before the />

orion_rus

12:46 pm on Jan 3, 2005 (gmt 0)

10+ Year Member



no i have it, what's why i ask about it in this forum)
<meta />

py9jmas

1:33 pm on Jan 3, 2005 (gmt 0)

10+ Year Member



You can't. For a start, to be valid HTML the document would have to have a HTML doctype, whereas to be a valid XHTML document you would have to use an XHTML doctype. You can't have both. XML and SGML are different.