View Full Version : w3c won't validate my xhtml?
Mystic0
09-02-2004, 10:51 AM
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<HTML>
<TITLE>HTML and JavaScript</TITLE>
<BODY>
<CENTER><B>Creating HTML and JavaScript</B></CENTER>
<P>Learning to create HTML tags can help dudes in many ways:</P>
<P>Moving on to something more advanced.</P>
<P>Spam. <U>SPAM SPAM SPAM.</U></P>
<P>Spam and eggs.</P>
<P><B>Spam</B> <I>and</I> <B>eggs.</B></P>
</BODY>
</HTML>
The w3c validator tells me this:
<font face="Verdana, Arial" size="2">
Line 4, column 17: there is no attribute "HTTP-EQUIV"
</font>
------------------
Your humble opinion is wrong.
Cool Matty
09-02-2004, 12:34 PM
In XHTML there is no such thing as HTML-EQUIV. So get rid of it.
------------------
"The future is not determined by a throw of the dice, but is determined by the conscious decisions of you and me."
I am addicted to ellipses!!! AHHH!!! ...
Make Sorrowind Worthwhile... join it! http://sorrowind.net
Mystic0
09-02-2004, 04:19 PM
Okey, I started over by using some code that is supposedly valid according to www.w3school.com (http://www.w3school.com) While it is tenativly valid, it still claims that it cannot detect the charecter encoding. How does one declare the charecter encoding in XHTML?
Here is the code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
------------------
Your humble opinion is wrong.
[This message has been edited by Mystic0 (edited September 02, 2004).]
Molgrew
09-02-2004, 04:27 PM
<?xml version="1.0" encoding="utf-8"?>
<!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">
<head>
<meta content="text/html; charset=utf-8"
http-equiv="content-type" />
------------------
"Music is the universal language and the
dialect we speak in is Hip Hop!" - King Solomon
[This message has been edited by Molgrew (edited September 02, 2004).]
Mystic0
09-02-2004, 05:26 PM
Thank's for getting charecter encoding to work. However, I now have a new problem:
<?xml version="1.0" encoding="utf-8"?>
<!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">
<head>
<meta content="text/html; charset=utf-8"
http-equiv="content-type" />
</head>
<body>
<p>Hello!</p>
</body>
</html>
Here is the output of the validator:
<font face="Verdana, Arial" size="2">
Line 7, column 8: end tag for "head" which is not finished
</font>
------------------
Your humble opinion is wrong.
Cool Matty
09-02-2004, 05:36 PM
It might require a <title></title> tag.
------------------
"The future is not determined by a throw of the dice, but is determined by the conscious decisions of you and me."
I am addicted to ellipses!!! AHHH!!! ...
Make Sorrowind Worthwhile... join it! http://sorrowind.net
Mystic0
09-02-2004, 05:37 PM
Huh? I added <title></title> inside <head></head> and now all of the sudden it works?
------------------
Your humble opinion is wrong.
Mystic0
09-02-2004, 05:38 PM
Heh, what a coincidence. Guess that was it! http://forums.massassi.net/html/smile.gif
------------------
Your humble opinion is wrong.
XHTML means strict structure. <title> happens to be one of those required ones.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.