Forum Moderators: phranque

Message Too Old, No Replies

Confused about "meta tags"

I had Dr HTML v6 check my page

         

jonw440

12:38 am on Apr 20, 2006 (gmt 0)

10+ Year Member



I used Dr HTML 6.0 to look at a few of my pages for html errors.
One of the errors that has me confused is the following:

BODY 43, 252, 254 A complete set of BODY tags was found. However, there are extra close BODY tags, which should be removed.
HEAD 3, 41, 166 A complete set of HEAD tags was found. However, there are extra open HEAD tags, which should be removed.
HTML 2, 165, 253, 255 More than one set of HTML tags was found. This will confuse many browsers, so you should remove the extra pairs.
TITLE 5(x2), 167(x2) More than one set of TITLE tags was found. This will confuse many browsers, so you should remove the extra pairs.

Here is my code within the head tags.
Do you see any extra head tags?

<!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=iso-8859-1" />
<title>How to clean your wheels and tires</title>
<META NAME="Description" CONTENT="How to properly clean and protect your wheels and tires." >
<META name="keywords" content="brake dust,cleaning wheels,cleaning tires,tire dressing,detailing clay,wurth zebra clay lube,collinite insulator wax,clearkote tire dressing">
<META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
<META NAME="robots" CONTENT="follow">
<script type="text/JavaScript">
<!--

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>

<style type="text/css">
td img {display: block;}
.style2 {color: #0000FF}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
</head>

encyclo

12:51 am on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It looks like the tool was confused by the XHTML syntax and the fact that you are missing some trailing slashes required to make the page valid. Your tags should always be in lower-case with XHTML syntax too:

<!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=iso-8859-1" />
<title>Your page title</title>
<[b]meta name[/b]="description" [b]content[/b]="your description here." [b]/[/b]>
<[b]meta[/b] name="keywords" content="your keywords" [b]/[/b]>

The two following meta elements can be removed completely as index and follow are already the default:

<META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
<META NAME="robots" CONTENT="follow">

If you still have problems, it may be that your syntax checker (I don't know the one you're using) may not support XHTML syntax at all. You could always use HTML 4.01 which is usually a better choice [webmasterworld.com] anyway:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Your page title</title>
<meta name="description" content="your description here.">
<meta name="keywords" content="your keywords">

celgins

1:01 am on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I ran your snippet of code with Dr. HTML 6.0 and received no errors.

The only thing I added to your code was:

<body>
</body>
</html>

So... either you have unclosed tags somewhere in your document after your <body> tag, or (like encyclo mentioned) you need to finish closing single tag items with XHTML compliant code (trailing slashes)

(ex. <input type="text" name="mystuff" />)

encyclo

1:09 am on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I ran your snippet of code with Dr. HTML 6.0 and received no errors.

This is surprising, as there clearly are errors as XHTML syntax requires lower-case asd trailing slashes on empty elements such as meta elements. This further gives the impression that the tool does not recognize XHTML at all (which is not a good sign).

You might want to try the W3C validator [validator.w3.org] instead, it will give you a better guide to the errors in your document.

celgins

3:46 pm on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...the tool does not recognize XHTML at all (which is not a good sign).

I agree.

Before this post, I'd never heard of Dr. HTML 6.0. (Not that I know of every HTML validator out there!)

jonw440

4:21 pm on Apr 20, 2006 (gmt 0)

10+ Year Member



Thanks guys!
I ran it under w3.org and fixed the meta tags. In XHTML you cant have the meta capitalized.
Why would I want my pages in XTML? Why not just plain HTML?
I made my site with Dream weaver 8.
I also downloaded CSE Validator Lite.
It showed a lot of column values with out the quotation marks. I fixed those and a few other errors that found.
my url is <snip>
If you want to check it.

[edited by: trillianjedi at 4:25 pm (utc) on April 20, 2006]
[edit reason] TOS #13 [/edit]

pageoneresults

4:57 pm on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why would I want my pages in XHMTL? Why not just plain HTML?

I think the above question ties in very well with a recent home page topic from DrDoc titled...

Why most of us should NOT use XHTML
[webmasterworld.com...]

Is it possible that with these default settings of WYSIWYG editors set to XHTML in their latest versions that they may be creating more of a problem than it is worth? I mean, we're talking about the <head></head> of the document. I surely wouldn't want something to misinterpret the <head> of my document, no way. What happens to the content after the <head>?

jonw440

5:09 pm on Apr 22, 2006 (gmt 0)

10+ Year Member



I switched all the pages over to HTML 4.01 Transisional.