View Full Version : This page is not Valid XHTML 1.0 Transitional!
torrent
02-02-2008, 06:40 AM
I'm getting 614 errors on my page. Can someone have a look at my tables and tell me what I'm doing wrong there? I think thats the main problem. I am using direct links, css, floats and a form. I hope to use ajax on this page in the future too, so users organize the page to their personal preference.
Failed validation, 614 Errors
Heres the page link
http://www.plentyoftorrents.com//ratedata/torrent%20search/index.htm
The table works with a javascript so I can rename things on the html page heres the start, first table and end, of the table.
<!-- table begins -->
<table cellspacing="1" cellpadding="2" class="" id="myTable" width="480">
<thead>
<tr>
<th class="c1"> Site</th>
<th class="c2"> Language</th>
<th class="c3"> Rating</th>
<th class="c4"> Status</th>
<th class="c5"> Category</th>
</tr>
</thead>
<tbody>
<tr class="r1">
<td class="c1"><a href="http://Bitenova.nl"> Bitenova.nl</a></th>
<td class="c2"> EN</th>
<td class="c3"> <span class="hideFromScreen">10</span><img src="tableimg/sr10.png"alt="10"/></th>
<td class="c4"> Public</th>
<td class="c5"><a href="http://www.plentyoftorrents.com/general.php#general"> General</a></th>
</tr>
</tr>
</tbody>
<tfoot>
<tr>
<th class="c1"> Site</th>
<th class="c2"> Language</th>
<th class="c3"> Rating</th>
<th class="c4"> Status</th>
<th class="c5"> Category</th>
</tr>
</tfoot>
</table>
<script type="text/javascript">
var t = new SortableTable(document.getElementById('myTable'), 100);
</script>
<!-- table ends-->
thanks for any help.
I think
<form name="search" action="results_new.php" method="post" /> ruins everything.
It closes the form tag immediately at that line. So after the real close tag of the form the festival begins :)
Also some notes:
* CSS comment start and end marks are /* and */ respectively. Not <!-- and -->.
* If you use Javascript or CSS with an XHTML page you should take them in <[CDATA[ and ]]> marks to prevent the XML parser from try to parse them.
torrent
02-02-2008, 07:40 AM
I think
<form name="search" action="results_new.php" method="post" /> ruins everything.
It closes the form tag immediately at that line. So after the real close tag of the form the festival begins :)
Also some notes:
* CSS comment start and end marks are /* and */ respectively. Not <!-- and -->.
* If you use Javascript or CSS with an XHTML page you should take them in <[CDATA[ and ]]> marks to prevent the XML parser from try to parse them.
lol festival.:D I just tried taking the slash out of it and then out of others in the form and it doesnt seem to help. :(
Ah, oh, not the inputs slashes, only the form tag's ;)
And also the close tag for td is not th, it is td again but in your code nearly all the td tags are closed with th tags ;)
torrent
02-02-2008, 08:52 AM
How do you mean the form tags?
torrent
02-02-2008, 09:29 AM
Nevermind thanks. I fixed that input problem. Now its just not recognizing the <tfoot> tag. and it doesnt recognize <style type="text/css">. :eek::confused:
The page still looks the same(the link you have given).
I meant that you should have a structure like this
<form action="somewhere.php" method="POST">
<input type="text" name="someField" />
<input type="submit" value="Send" />
</form>
It will definetly recognize the tfoot and style tags. If it does not, it means that you have some other error(s) BEFORE them.
Check very carefully and again do not forget to replace the </th>s with </td>s ;)
torrent
02-02-2008, 12:06 PM
I changed it to:
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
Which only shows like 5 or 6 errors now, alot more forgiving:D. But I'm gonna leave the errors for later and start making the other pages the same.
Thanks again.
;)
jscheuer1
02-02-2008, 03:07 PM
You should not use a frameset DOCTYPE if the page isn't a frameset, which it appears that it is not. There is virtually no reason to use XHTML either. This is the preferred DOCTYPE for all non-frameset web pages:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Or, if you need a little more leeway, you may use:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
When using either of those, just use a plain opening <html> tag after them.
torrent
02-02-2008, 03:22 PM
Do those 2 support tables, <br /> and /> ? Ive got it working in all browsers now.
The first page I was working on.
http://www.plentyoftorrents.com/
Then I started doing the same thing to this page.
http://www.plentyoftorrents.com/web/
and I'm up to here now.
http://www.plentyoftorrents.com/tut.htm
5 more pages to fix and I'm done. :p
Of course they do support tables :D
However in HTML 4.01 short close( />) is deprecated.
I think you should examine the document types a bit ;)
It isn't deprecated, it doesn't exist (and never has). <foo /> in HTML has a different meaning: it means <foo>>. However, few browsers support this rather ancient feature of SGML, which is why all these poor pseudo-XHTML pages don't have little > symbols scattered all over them. This is arguably a bug on the part of those browsers. On the topic of XHTML, read this: http://www.webdevout.net/articles/beware-of-xhtml
jscheuer1
02-02-2008, 04:07 PM
Of course they do support tables :D
However in HTML 4.01 short close( />) is deprecated.
I think you should examine the document types a bit ;)
Not exactly deprecated, it hasn't been instituted, but - it works out to mean about the same thing. Put another way, unless you are using xml/XHTML, you don't need and should not use />. You can just use the normal HTML >.
My source is below
Line 7, Column 64: NET-enabling start-tag requires SHORTTAG YES.
…f="css/general.css" rel="stylesheet" type="text/css" />
✉
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HMTL 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HMTL 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
So it says exactly what Twey says but I think I can conclude it exists from this explanation ;)
jscheuer1
02-02-2008, 06:05 PM
Like most W3c explanations, this one is overly wordy and confusing. It could mean that in HTML 4.01 Strict:
<FOO/
is the same as:
<FOO>
But that since most browsers don't interpret it that way, it is best to avoid it.
It could also possibly mean that in HTML 4.01 Strict:
<FOO/>
is the same as:
<FOO></FOO>
But that support isn't wide enough in the browsers to use it reliably.
In actual practice though, you cannot use /> to close a tag in HTML unless it is a tag that self closes, like img, br, or meta, etc. which do not require /> in HTML anyway, so just stop using it or worrying about it in HTML.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.