non-valid XHTML DTD

  • Thread starter Rafal 'Raf256' Maj
  • Start date
R

Rafal 'Raf256' Maj

Hi,
I'm rewritting some older pages. New pages I write in HTML, so I declare:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

What should I put at begin of old pages to indicate that they are
(probably) partialy HTML compatible?

What type of W3C DTD is most "easy" or "bad html style" tollerable?

Old code looks like for example:


<b><font color="#3333FF"><font size=+1>aaa</font></font></b>
<blockquote>
<br> aaaa
<a href="xxxx"><img SRC="right_blue.gif" BORDER=0 height=15 width=15></a>
</blockquote>
<blockquote>&nbsp;</blockquote>


So I think it is valid HTML... 4.0 ?
 
N

Neal

Hi,
I'm rewritting some older pages. New pages I write in HTML, so I declare:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

http://www.w3.org/TR/2002/REC-xhtml1-20020801/#docconf

I'd use the Strict doctype for all new pages. Use this transitional
doctype when, well, transitioning a document from presentational HTML to
semantic.
What should I put at begin of old pages to indicate that they are
(probably) partialy HTML compatible?

What type of W3C DTD is most "easy" or "bad html style" tollerable?

Old code looks like for example:


<b><font color="#3333FF"><font size=+1>aaa</font></font></b>
<blockquote>
<br> aaaa
<a href="xxxx"><img SRC="right_blue.gif" BORDER=0 height=15 width=15></a>
</blockquote>
<blockquote>&nbsp;</blockquote>


So I think it is valid HTML... 4.0 ?

It's awful, but will validate under Transitional.
 
J

Jukka K. Korpela

Neal said:
It's awful, but will validate under Transitional.

There's no doubt on the "awful" part (what is a no-break space as a block
quotation?), but it won't even validate. The attribute value "+1" must be
quoted in all versions of HTML, and since HTML 4.0, the ALT attribute is
syntactically obligatory in an <img> element.

And, of course, it will fail validation under any XHTML DTD (see the
Subject line) due to the lack of the fancy "/", too.
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top