Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't validate for 4.01 transitional

Status
Not open for further replies.

Chrischo

Technical User
Jun 11, 2001
13
US
I have a page that needs to validate for HTML 4.01 transitional. I have written the page mostly in XHTML but because of browser problems in NS6, I decided to change the doctype and go with this. It works fine but for some reason I am getting three error messages from the W3C validator that I can't fix. Here they are followed by the entire code of the page. Thanks for any advice you can give.
--------------------------------------------

Line 7, column 28:
<style type=&quot;text/css&quot;> @import url(template3.css);</style>
^
Error: element &quot;STYLE&quot; not allowed here; check which elements this element may be contained within

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

Line 11, column 8:
<body>
^
Error: element &quot;BODY&quot; not allowed here; check which elements this element may be contained within
--------------------------------------------------

<!-- BEGIN HEADER -->
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html lang=&quot;en&quot;>
<head>
<title>Harvard Law School Faculty Template</title>
<link rel=&quot;stylesheet&quot; href=&quot;template1_NN4.css&quot; type=&quot;text/css&quot; />
<style type=&quot;text/css&quot;> @import url(template3.css);</style>
<script src=&quot;template.js&quot; language=&quot;javascript&quot; type=&quot;text/javascript&quot;></script>
</head>

<body>
<table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;header&quot;>
<tbody>
<tr>
<td width=&quot;400&quot; height=&quot;128&quot; valign=&quot;top&quot;>
<table width=&quot;400&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td width=&quot;113&quot; valign=&quot;top&quot; class=&quot;header&quot;><img src=&quot;hls_shield.gif&quot; align=&quot;left&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;HLS Shield&quot; /></td>
<td width=&quot;287&quot; valign=&quot;middle&quot; class=&quot;header&quot;><img src=&quot;law_title.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;Harvard University Faculty Page&quot; /></td>
</tr>
<tr>
<td width=&quot;400&quot; height=&quot;35&quot; colspan=&quot;2&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td width=&quot;400&quot; height=&quot;35&quot; class=&quot;top&quot;><img src=&quot;spacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td width=&quot;375&quot; height=&quot;128&quot; valign=&quot;top&quot;>
<table width=&quot;375&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td width=&quot;375&quot; height=&quot;44&quot; align=&quot;right&quot; valign=&quot;middle&quot; colspan=&quot;3&quot; class=&quot;header&quot;><script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>writeDate();</script></td>
</tr>
<tr>
<td width=&quot;150&quot; height=&quot;84&quot; align=&quot;center&quot; class=&quot;top&quot;><a href=&quot;1&quot; class=&quot;topnav&quot;>Harvard Home</a><br /><a href=&quot;2&quot; class=&quot;topnav&quot;>HLS Home</a><br /><a href=&quot;3&quot; class=&quot;topnav&quot;>Students</a></td>
<td width=&quot;75&quot; height=&quot;84&quot; align=&quot;right&quot; class=&quot;top&quot;><img src=&quot;test3.gif&quot; vspace=&quot;0&quot; hspace=&quot;1&quot; alt=&quot;Some Pic Here&quot; /></td>
<td width=&quot;150&quot; height=&quot;84&quot; align=&quot;center&quot; class=&quot;top&quot;><a href=&quot;4&quot; class=&quot;topnav&quot;>Administration</a><br /><a href=&quot;5&quot; class=&quot;topnav&quot;>Blackboard</a><br /><a href=&quot;6&quot; class=&quot;topnav&quot;>Faculty</a></td>
</tr>
</tbody>
</table>
</td>
<td width=&quot;100%&quot; height=&quot;128&quot; valign=&quot;top&quot; >
<table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td width=&quot;100%&quot; height=&quot;44&quot; class=&quot;header&quot;><img src=&quot;spacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td>
</tr>
<tr>
<td width=&quot;100%&quot; height=&quot;84&quot; class=&quot;top&quot;><img src=&quot;spacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table align=&quot;left&quot; width=&quot;200&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td width=&quot;35&quot;><img src=&quot;spacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td>
<td width=&quot;144&quot; valign=&quot;top&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;biogr.html&quot; class=&quot;sidenav&quot;>Biographical Info</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;cirri.html&quot; class=&quot;sidenav&quot;>Cirriculum Vitae</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;worki.html&quot; class=&quot;sidenav&quot;>Working Papers</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;publi.html&quot; class=&quot;sidenav&quot;>Published Papers</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;acade.html&quot; class=&quot;sidenav&quot;>Academic Courses</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;curre.html&quot; class=&quot;sidenav&quot;>Current Projects</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
<tr><td width=&quot;144&quot; height=&quot;25&quot; class=&quot;sidenav&quot;><a href=&quot;bibli.html&quot; class=&quot;sidenav&quot;>Bibliography</a></td></tr>
<tr><td width=&quot;144&quot; height=&quot;10&quot;><img src=&quot;navbottomspacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td></tr>
</tbody>
</table>
</td>
<td width=&quot;21&quot;><img src=&quot;spacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td>
</tr>
</tbody>
</table>
<table width=&quot;575&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td>
<br />
<!-- END HEADER -->





<b>William W. Fisher, III</b><br />
<i>Professor of Law, Harvard University</i>
<br /><br />
<img src=&quot;temp.jpg&quot; align=&quot;left&quot; border=&quot;0&quot; vspace=&quot;3&quot; hspace=&quot;15&quot; alt=&quot;Lucian Arye Bebchuk&quot; /><br /><br />
<p>Most of my work pertains to four related topics: American Legal History; Property Law; Intellectual-Property Law; and the Law of the Internet. The principal purpose of this homepage is to make my scholarship and teaching materials on those topics more widely available. welcome comments and suggestions, especially concerning my current projects.</p>
<p><a href=&quot;test.html&quot; class=&quot;main&quot;>Lucian Arye Bebchuk </a>is the William J. Friedman and Alicia Townsend Friedman Professor of Law, Economics, and Finance at Harvard Law School. He is also a Fellow of the American Academy of Arts and Sciences, a Research Associate of the National Bureau of Economic Research, and a frequent visitor to Tel Aviv University.</p>
<p>Trained in both law and economics, Bebchuk holds a B.A. in Mathematics and Economics from the University of Haifa, an LL.B. from the University of Tel-Aviv, an M.A. and Ph.D in Economics from the Harvard Economics Department, and an LL.M. and S.J.D. from Harvard Law School. Following a three-year fellowship at the Harvard Society of Fellows, he joined the Harvard Law School faculty in 1986 as an assistant professor, becoming a full professor in 1988 and the Friedman Professor of Law, Economics and Finance in 1998.</p>





<!-- BEGIN FOOTER -->
</td>
</tr>
</tbody>
</table>
<br /><br />
<table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tbody>
<tr>
<td width=&quot;200&quot; align=&quot;left&quot; valign=&quot;top&quot;><img src=&quot;spacer.gif&quot; border=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; alt=&quot;&quot; /></td>
<td align=&quot;left&quot; valign=&quot;top&quot;>
<hr width=&quot;100%&quot; />
<span class=&quot;footer&quot;><b>Harvard Law School, 1563 Massachusetts Avenue, Cambridge, MA 02138</b><br />
Phone: 617-495-3100; <a href=&quot;/cgi-bin/contact.pl&quot;> Contact Harvard Law School</a>.<br /><br />
Copyright: Copyright ©2002 The President and Fellows of Harvard College.<br />
Last modified: Wed, Jan 23, 2002, 15:41:24 EST<br />
URI: />
</span>
</td>
<td valign=&quot;top&quot; align=&quot;right&quot;><hr width=&quot;100%&quot; /><form method=&quot;post&quot; action=&quot;/cgi-bin/search&quot; class=&quot;search&quot;>
<input type=&quot;hidden&quot; name=&quot;config&quot; value=&quot;htdig&quot; />
<span class=&quot;prompt&quot;>Search:</span> <input type=&quot;text&quot; name=&quot;words&quot; size=&quot;15&quot; value=&quot;&quot; maxlength=&quot;200&quot; /> <input type=&quot;submit&quot; value=&quot;go&quot; />
<br /><input type=&quot;checkbox&quot; name=&quot;restrict&quot; value=&quot;/faculty/jharvard/&quot; checked=&quot;checked&quot; /><em>Restrict to directory: &quot;/faculty/jharvard/&quot;</em>
</form>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<!-- END FOOTER -->
 
The problem deals with you closing your tags such as image and link when you are not using a XHTML doctype. Go ahead and add


<!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&quot;
to the top of your page and then the only problem with the validation is:

URI: />

where you just need to take out that semi-colen and your set.

If you would like to stay with HTML 4.01 transitional, the take out all the <img .... / > instances and <link ... / > instances because you don't need them, and I believe HTML 4.01 forbids ending those tags!

Hope that helps ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Thanks, I will give that a go. I had to go with 4.01 instead of xhtml because NS6 was breaking my table slightly and I don't have the time to fiddle around with CSS to fix it. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top