Forum Moderators: open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
I copied that from the W3C site, switching the
!DOCTYPEand
?xmllines as suggested by (I believe) Tedster in an earlier thread.
When I run through the validator at W3C I get the following:
I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document. The sources I tried are:
The HTTP Content-Type field.
The XML Declaration.
The HTML "META" element.
blah blah blah....
I had used the
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> What am I missing? Thanks for your help.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
with closing the meta like this
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<head>
<title>Whatever</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
</head>
<body>
<p>This is a text.</p>
</body>
</html>
Can't remember now where did I get the ...http-equiv="content-type" content="application/xhtml+xml;... meta but there was some good info in the web about how to describe the content.
Ah! I found it: [w3.org...]
Any way to get validated code that IE6 interprets as strict?
Any way to get validated code that IE6 interprets as strict?
The HTTP Content-Type field.
Andreas
Content-Type: text/html; charset=ISO-8859-1
[faqs.org...] - 14.17 Content-Type
Andreas