Forum Moderators: open
Below are the results of attempting to parse this document with an SGML parser.
^Error: there is no attribute "LEFTMARGIN" for this element (in this HTML version)
^Error: there is no attribute "TOPMARGIN" for this element (in this HTML version)
^Error: there is no attribute "MARGINWIDTH" for this element (in this HTML version)
^Error: there is no attribute "MARGINHEIGHT" for this element (in this HTML version)
^Error: element "UL" not allowed here; possible cause is an inline element containing a block-level element
Anyone know how I use CSS or something else to position the page with no margins so the page will validate? Also, whats with the <ul> tag, can I not use it in certain areas? Thanks.
-Russell
UL is a block level element and can only be a child of certain other block-level elements [htmlhelp.com].
<td width="66%" valign="top">
<font size="2" face="Arial, Helvetica, sans-serif">
text:
<ul>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
</ul>
text....
</font>
</td>
What do I have to change it to to make it work?
Thanks a bunch for the help! By the way...that CSS code dosn't seem to work in mozilla..i still see marigins in that browser.
body{margin:0px;padding:0px;}
If you require "0" margins for all four properties; top, left, bottom, right, there is no need to declare each one.
P.S. I don't see any problems with your ul example. I would definitely consider getting that <font> tag out of there and using css to control font elements. You can also use css to control formatting with your td, ul and li.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29%" height="244" align="right" valign="top"><a href="link.html"><img src="images/image.gif" alt="" width="174" height="222" border="0"></a>
</td>
<td width="5%"></td>
<td width="66%" valign="top">
<font size="2" face="Arial, Helvetica, sans-serif">
text:
<ul>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
</ul>
text....
</font>
</td>
</tr>
</table>
do you think it could have something to do with where the <font> is?
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29%" height="244" align="right" valign="top"><a href="link.html"><img src="images/image.gif" alt="" width="174" height="222" border="0"></a>
</td>
<td width="5%"></td>
<td width="66%" valign="top">
<font size="2">text: </font>
<ul>
<li><a href="link.html"><font size="2">Link</font></a></li>
<li><a href="link.html"><font size="2">Link</font></a></li>
<li><a href="link.html"><font size="2">Link</font></a></li>
<li><a href="link.html"><font size="2">Link</font></a></li>
</ul>
<font size="2">text.... </font>
</td>
</tr>
</table>
I'm going to suggest that you take the steps now to utilize css for your font attributes. This will eliminate any errors relative to font issues.
Once I grokked what that was all about, validation got pretty smooth. But I learned HTML in a very seat-of-the-pants fashion. If my code displayed well in IE and Netscape that was all I cared about in the beginning.
So, there have definitely been some bad habits broken as I learn the new ones.
I use ASP and believe it's very difficult to get ASP to validate, but I've been doing OK so far, until I hit the querystring..
I understand from various answers that to get it to validate
link.asp?a=b&c=d becomes: link.asp?a=b&c=d
which is fine, but then when I try to read the query string value c=d
Validator is not reading it although my page is displaying fine (which it wouldn't do according to the validator code)
any ideas or have any of you hit this before?
I use ASP and believe it's very difficult to get ASP to validate,
Me thinks itīs not only difficult, but next to impossible to validate ASP or any server side scripting language as HTML/XHTML. The good thing is, we donīt need or even want it to validate. All we want to validate and all that is sensible to try to validate is the HTML/XHTML document produced by the server side script. All we want our server side script to be is syntactically correct (which we cannot check using an SGML parser) and useful and fast and ...
but then when I try to read the query string value c=d
Validator is not reading it
Why would you want or even expect the validator to read, parse and understand your query string? The browser will decode the entities when it requests an URL which contains entity references. Then it is up to your server side scripting language to parse the query string.
The validator just checks whether a document conforms with a given document type definition.
So it comes down to this: The validator validates, the browser browses, the server serves ;) Donīt expect the validator to serve, the browser to validate or the server to browse.
Andreas
I'll have to disagree with that statement. I have more than a handful of sites using asp and they all validate. The only real problem that we ran into were unescaped ampersands and that was easy to fix. Any other errors were due mainly to improper nesting of elements that my programmer set up in his asp.
He and I have worked together to establish a set of guidelines for coding. Now we place the W3C html and css icons on every page of the site with the referrer URL query. Any time a change is made, we view the page in the browser and click that little icon to make sure we still validate. It has now become habit! ;)
I also disagree, as I've always managed to validate my asp sites too, this was just an unusual problem, as HTML would validate, but when I "clicked on the validator icon", the validator was not reading the source code the same as mine, I was obviously parsing it first or I wouldn't just have had the one error!
:)
anyway problem is now fixed, I had the validator icon linking to a hard coded URI as I was testing from a local server, but I changed it to link to
"check/referer" and then uploaded it to server and this along with the escaped ampersands did the trick
Thanks to everyone for their input
Suzy
All the validator or spider should and will ever see, assuming the server is configured correctly and your script is working ok, is an HTML document.
This is confirmed by Suzyīs statement: I changed it [the validator icon] to link to "check/referer" and this [...] did the trick.
The validator script will read the referrer from the HTTP header and will request that URL. The server that is named in the URLīs authority section will then serve the resource. If it is an ASPage the page will be parsed and the code executed. The result (hopefully a syntactically correct HTML document, no ASP/PHP/Perl is sent and there is not neccessarily a way to tell which technology was used to produce that HTML document) is then sent to the validator script which will validate it.
You can produce valid HTML with every scripting or programming language. The code that produces this valid HTML needs to be syntactically correct code according to that languages syntax.
Hope this clears things up.
Andreas