PDA

View Full Version : validate error about 'element not allowed here'



sixrfan
Apr 26th, 2010, 12:26 AM
i have the code below in the template file that feeds the index file for this page: http://fcalgorithmsconsulting.com/index1.html.

this is the same setup i have for a number of other sites that run clean through the validator, but for some reason the validator is giving a number of messages about things in the head section not allowed in certain places: click here (http://validator.w3.org/check?uri=http%3A%2F%2Ffcalgorithmsconsulting.com%2Findex1.html&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&verbose=1&user-agent=W3C_Validator%2F1.767).

please advise how i fix. thanks!




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->

<link href="../fca_style.css" rel="stylesheet" type="text/css">
<!--[if IE 8]>
<style type="text/css">
#wrap {display:table;}
</style>
<![endif]-->
</head>

<body>

mbaker
Apr 26th, 2010, 12:34 AM
The problem is that XHTML and HTML don't mix.

If you change the line:

<meta name="Description" content="We specialize in heavy duty consulting on financial problems that are super challenging and develop products to mitigate risks in financial planning." />

to:

<meta name="Description" content="We specialize in heavy duty consulting on financial problems that are super challenging and develop products to mitigate risks in financial planning." >

all should be well.

sixrfan
Apr 26th, 2010, 12:37 AM
thank you! that did the trick. it's always the little things.

JGirl
Apr 26th, 2010, 12:40 AM
i have the code below in the template file that feeds the index file for this page: http://fcalgorithmsconsulting.com/index1.html.

this is the same setup i have for a number of other sites that run clean through the validator, but for some reason the validator is giving a number of messages about things in the head section not allowed in certain places: click here (http://validator.w3.org/check?uri=http%3A%2F%2Ffcalgorithmsconsulting.com%2Findex1.html&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&verbose=1&user-agent=W3C_Validator%2F1.767).

please advise how i fix. thanks!




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->

<link href="../fca_style.css" rel="stylesheet" type="text/css">
<!--[if IE 8]>
<style type="text/css">
#wrap {display:table;}
</style>
<![endif]-->
</head>

<body>



You're using a self-closing tag for "keywords" -- that's what's causing your error(s). Remove the "/" from the end of your "keywords" tag, and you should validate just fine ;)

<meta name="Keywords" content="wealth managers, custodians, consulting, irebal, calculators">

bazz
Apr 26th, 2010, 04:09 AM
For future pages, it would be better to us a strict doctype and perhaps xhtml 1.0

As far as I consider it: Transitional is used when upgrading a site from one doctype to another. new sites should always be strict in whichever version of html, you would use.

bazz