Forum Moderators: open

Message Too Old, No Replies

Validating my code and getting massive errors

         

Netsmith

8:38 pm on May 27, 2007 (gmt 0)

10+ Year Member



I am a neophyte working on a new website in dreamweaver 8.
When I attempt to validate the HTML via various online sites, I get a numerous errors - examples being

Line 6, character 117:
... l tips, vacation attractions"/>
^Warning: net-enabling start-tag; possibly missing required quotes around an attribute value

Line 7, character 23:
<style type="text/css">
^Error: element STYLE not allowed here; check which elements this element may be contained within

Line 12, character 56:
... ="stylesheet" type="text/css">
^Error: element LINK not allowed here; check which elements this element may be contained within

Line 14, character 111:
... tion with our helpful tips." />
^Warning: net-enabling start-tag; possibly missing required quotes around an attribute value

Line 14, character 111:
... tion with our helpful tips." />
^Error: element META not allowed here; check which elements this element may be contained within

Line 15, character 106:
... rdf+xml" title="ICRA labels" />
^Warning: net-enabling start-tag; possibly missing required quotes around an attribute value

Line 15, character 106:
... rdf+xml" title="ICRA labels" />
^Error: element LINK not allowed here; check which elements this element may be contained within

Line 16, character 304:
... 0 oe 0 of 0 og 0 oh 0 c 0))' />
^Warning: net-enabling start-tag; possibly missing required quotes around an attribute value

Line 16, character 304:
... 0 oe 0 of 0 og 0 oh 0 c 0))' />
^Error: element META not allowed here; check which elements this element may be contained within

Line 17, character 7:
</head>
^Error: end tag for element HEAD which is not open; try removing the end tag or check for improper nesting of elements

Line 19, character 6:
<body>
^Error: element BODY not allowed here; check which elements this element may be contained within

I really don't understand any of them, especially telling me the head tag isn't open. It absolutely is, as far as I can see, and needs a closing tag. Recreating the page from scratch gets me the same errors and the validators seem to find the '/' character to be incorrect when its automatically inserted by dreamweaver.

Any help would be appreciated.

[edited by: Netsmith at 8:40 pm (utc) on May 27, 2007]

jbinbpt

9:18 pm on May 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What doctype?
Post a copy of the head, removing anything that identifies the site.

encyclo

9:43 pm on May 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dreamweaver should not be inserting the trailing slashes if you are using a HTML 4.01 doctype. Unfortunately I don't use DW, but check out some of the options and deselect anything referring to XHTML syntax. Then remove the trailing slashes and it should improve the validation problem. :)

Netsmith

9:55 pm on May 27, 2007 (gmt 0)

10+ Year Member



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>REMOVED</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="REMOVED"/>
<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">

<meta name="description" content="REMOVED." />
<link rel="meta" href="http://REMOVED.com/labels.rdf" type="application/rdf+xml" title="ICRA labels" />
<meta http-equiv="pics-Label" content='(pics-1.1 "http://www.icra.org/pics/vocabularyv03/" l gen true for "http://REMOVED.com" r (n 3 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0) gen true for "http://www.REMOVED.com" r (n 3 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0))' />
</head>

Well, when I went to create a new basic html page I noticed it defaulted to xhtml transitional, although it appears my current page is 4.01 transitional.

Is there a way to alter a doc type after the page is created, or am I going to be copying everything all over again?

Thanks for your input.

londrum

9:58 pm on May 27, 2007 (gmt 0)

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



try closing this one:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

make it
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

that should cascade down, and fix all of the problems below it.

but either close them all, or unclose them all - one or the other

[edit]
oh, and close this one as well:

<link href="style.css" rel="stylesheet" type="text/css">

rocknbil

10:32 pm on May 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why are you suggesting xhtml-style closing tags with a 4.01 doctype in quirks mode?

Eden2000

12:04 am on May 28, 2007 (gmt 0)

10+ Year Member



Have you had any help at all with this? I think I can help you. What kind of an html page are you attempting to create? If it is a simple html page it should be this:

<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<title>YOUR WEBSITE OR PAGE TITLE HERE</title>
<meta name="description" content="DESCRIPTION HERE">
<meta name="keywords" content="KEYWORDS,HERE,SEPARATED BY COMAS">
<meta name="robots" content="index,follow,all">
<link href="style.css" rel="stylesheet" type="text/css">

ANY OTHER SCRIPT YOU MAY HAVE HERE IN THE HEAD - THEN CLOSE THE HEAD
</HEAD>
<BODY>

ALL OF YOUR VISIBLE PAGE TEXT AND CONTENT HERE
THEN CLOSE THE BODY AND HTML AND YOU HAVE IT!
</BODY>
</HTML>

Don't use DW for simple html tasks, it is far more complicated than a simple html page needs.

I hope this helps. Let me know, maybe I can help more!
Thanks
Eden2000

tedster

12:30 am on May 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Validators will often "cascade" errors following the first problem -- so what looks like 142 errors ends up being only two or three. Fix the very first error, then revalidate. Then fix the first one again. This usually cleans things up a lot faster than you think might be the case.

Fotiman

2:52 pm on May 29, 2007 (gmt 0)

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




<meta name="keywords" content="REMOVED"/>

Try removing the closing slash:

<meta name="keywords" content="REMOVED">

Also, make sure the values in the content attribute don't contain any quotes that might be closing the attribute or any <> characters.