Validation Errors

Regarding www.propertieswithstyle.com

Line 4, Column 6: document type does not allow element “head” here
<head>
:email:
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a “style” element in the “body” section instead of inside “head” – or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s “self-closing” tags for “meta” and “link” in the “head” section of a HTML document may cause the parser to infer the end of the “head” section and the beginning of the “body” section (where “link” and “meta” are not allowed; hence the reported error).

Here is my code:

<!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" lang="en" xml:lang="en" />  
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="en"/>
<meta name="keywords" content="orange county real estate, local broker, local real estate broker, local agent, local real estate agent, orange county real estate broker, orange county real estate agent." />
<title>Properties With Style Home Page - Orange County Real Estate</title> 
<link type="text/css" rel="stylesheet" href="css/homepage.css" media="screen,projection,tv"/>

</head>

Then . . .

Line 14, Column 6: document type does not allow element “body” here
<body>
:email:
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a “style” element in the “body” section instead of inside “head” – or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s “self-closing” tags for “meta” and “link” in the “head” section of a HTML document may cause the parser to infer the end of the “head” section and the beginning of the “body” section (where “link” and “meta” are not allowed; hence the reported error).

How does anyone know what to do here . . ?

This page displays very well in IE8 but lousy in Chrome.

Any ideas on where to find the answers for this. None of the books I have get into it this deep.

Thanks . . . Rick

You have a / in the end of your <html> tag making it self closing - therefore nothing is allowed after it as that ends the document.

Remove that / and then you will be able to have a separate </html> tag and content for the page in between.

Thanks felgall.

I’m sitting here with a book trying to get the understanding of the DOC TYPE - <title> - <meta> - and <link>. Just where does the <link type=“text/css” etc go?

Between the <head></head> tags.

Got it!

I’m moving along in the book.

Next is Meta tags . . .

Thanks felgall . . .