re: Validator - please, explain!

liunx

Guest
I ran couple of pages of mine through W3 validator, and some of the comments are not clear to me.<br />
<br />
Could somebody explain, why I got this back? (I'm putting the "error" stuff in red)<br />
<br />
<br />
<script language="Javascript"><br />
<br />
or<br />
<br />
...marginwidth="0" marginheight="0"><br />
<br />
and so on? The explanaition stated that it is a "reference to a non-SGML character". I don't get it! <br />
<br />
doctype was set as<br />
<!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--content-->Hmm, not sure maybe it would help if you showed all the code? Also, when it comes to only numbers, you don't need to put quotes around them, usually they are only needed for words or percentages.<!--content-->Have you, perhaps, used 〉 (&#9002;) for > (&#62;) and “ (&#8220;) for " (&#34;)?<!--content-->Khm... I know about quotes, but thought they maybe useless in some places, their presence can't hurt (or so I think)<br />
<br />
Here is a part of the code (just to make clear that there is no visible connections to errors - check out the javascript line.)<br />
<br />
-----------------<br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><br />
<br />
<html><br />
<head><br />
<title>Nice Try</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<style type="text/css"><br />
<!--<br />
A:link {text-decoration: none; color: #FFFFFF}<br />
A:visited {text-decoration: none; color: #FFFFFF}<br />
A:hover {text-decoration: none; color: #CCCCCC}<br />
--><br />
</style><br />
<script language="JavaScript"><br />
<!--<br />
//BEGIN Script<br />
function new_window(url) <br />
{<br />
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=250,height=375, left=80,top=30");link.focus();<br />
}<br />
<br />
function MM_jumpMenu(targ,selObj,restore){ //v3.0<br />
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");<br />
if (restore) selObj.selectedIndex=0;<br />
}<br />
//--><br />
</script><br />
</head><br />
<br />
<br />
------------------<br />
validator shows the following error>: required attribute "type" not specified (do I have to specify Javascript 1.2 or any other specification???)<br />
<br />
(more coming)<!--content-->Have you, perhaps, used ...<br />
<br />
No.<!--content--><SCRIPT LANGUAGE="JavaScript" type="text/javascript"><!--content-->I see... thanks<br />
<br />
how about this complete line?<br />
<br />
<body bgcolor="#0066CC" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br />
<br />
error explained: there is no attribute "leftmargin"<br />
<br />
the same goes for all first set of " in topmargin, marginwidth and marginheight.<br />
<br />
:confused:<!--content-->Basically there is no such thing as marginheight and marginwidth within HTML 4.01 Transitional <body> use CSS instead.<br />
<br />
<script type="text/javascript"><br />
<!--<br />
<br />
// --><br />
</script><br />
<br />
You also forgot to inform the browser which script language type you were using. Using marginwidth however would have been available for frames if you were using the Frameset.<!--content-->Robert Wellock<br />
there is no such thing as marginheight and marginwidth within HTML 4.01 Transitional<br />
More specifically, there is no marginheight or marginwidth (or leftmargin and topmargin) in any version of HTML at all.<!--content-->Thanks, people!<br />
could you, though, be a little bit less vague about "no marginheight" etc. <br />
<br />
I'm learning by a hands-on experience, (meaning "Ouh... lets see what this pretty button does.... Ba-a-am... O-ops! OK, now I know, but I still don't know why...") no schooling yet, please, point me in the right direction.<!--content-->A little while back each browser had its own proprietary HTML versions. left- and topmargin belonged to IE and margin- height and width belonged to NS. Now they are moving toward being compliant with actual HTML defined by the W3C (<!-- m --><a class="postlink" href="http://www.w3.org/">http://www.w3.org/</a><!-- m -->). See the HTML 4.01 Specification (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a><!-- m -->) and the CSS2 Specification (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/">http://www.w3.org/TR/REC-CSS2/</a><!-- m -->).<!--content-->:cool: <br />
many thanks<!--content-->Within your styles tag, you can add the following code, and just have a normal body tag.<br />
<br />
body { background-color:#0066CC; color:#000000; margin-left:0px; margin-top:0px; margin-right:0px; }<!--content-->Thanks<br />
:)<!--content-->
 
Back
Top