xhtml validator
Posted
by lolalola
on Stack Overflow
See other posts from Stack Overflow
or by lolalola
Published on 2010-05-27T16:19:38Z
Indexed on
2010/05/27
16:21 UTC
Read the original article
Hit count: 208
XHTML
Hi, why w3 validator show error?
"Line 5, Column 7: 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 which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
"
My code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
Text...
</body>
</html>
© Stack Overflow or respective owner