xhtml validation error

P

Patrick Kik

Hi,

This is the code:
---------- begin xhtml ----------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
</head>
<body>
</body>
</html>
---------- end xhtml ----------

And this is the error when I validate with
http://www.w3schools.com/xhtml/xhtml_validate.asp:
---------- begin error ----------
Line 7, column 6: end tag for "head" which is not finished

</head>

Most likely, You nested tags and closed them in the wrong order. For example
<p><em>...</p> is not acceptable, as <em> must be closed before <p>.
Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element (e.g. 'ul') which requires a
child element (e.g. 'li') that you did not include. Hence the parent element
is "not finished", not complete.

---------- end error ----------

I don't get it. What did I do wrong?

I hope someone can help me!

Greetings,

Patrick Kik, The Netherlands
 
N

Neal

Hi,

This is the code:
---------- begin xhtml ----------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
</head>
<body>
</body>
</html>


Another possibility is that you used an element (e.g. 'ul') which
requires a
child element (e.g. 'li') that you did not include. Hence the parent
element
is "not finished", not complete.

That's the one. title is a required element.
 
N

Neal

What goes before the 'i' in 'iso' and after the 'l' in 'html'?

Er, nothing. It's a HTTP "equiv", the whole HTTP line would be:

text/html; charset=iso-8859-1

So why add characters to the HTTP header??
 
M

m

Neal said:
Er, nothing. It's a HTTP "equiv", the whole HTTP line would be:

text/html; charset=iso-8859-1

So why add characters to the HTTP header??

Silly me.
 
D

Dylan Parry

Spake m unto thee:
What goes before the 'i' in 'iso' and after the 'l' in 'html'?

If you are implying that they are missing quotes, then you are incorrect.
The 'content' attribute has the value of 'text/html; charset=iso-8859-1',
they are not two separate attributes.

For the correct answer see my other post.
 
T

Toby Inkster

Patrick said:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">

As well as the missing <title> element, it is extremely unlikely that your
doctype is correct.

Unless you have a directory called "DTD" containing a file
"xhtml1-strict.dtd" you should use an absolute reference to the URL.
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top