JavaScript Loop Inside HTML Table Won't work
<p>I have a JavaScript assignment, and part of that assignment is having a two-column table with embedded JavaScript that loops through 50 temperatures in both Celsius and Fahrenheit.</p>

<p>I checked W3's HTML validator and it tells me so far I have 2 errors... The one I can never seem to get rid of is "Element script not allowed as child of element tbody in this context".</p>

<p>And this is my code:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;style type="text/css"&gt;
body { background-image:url('background.png'); text-align:center; font-family:verdana; color:white; }

ul
{
list-style-type:none;
margin:0;
padding:0;
padding-top:6px;
padding-bottom:6px;
}
li
{
display:inline;
}

a:link,a:visited
{
opacity:0.75;
filter:alpha(opacity=75);
font-weight:bold;
color:#FFFFFF;
background-color:#999999;
text-align:center;
padding:5px;
text-decoration:none;
text-transform:uppercase;
border: 1px solid white;
font-weight:bold;
}

a:hover,a:active
{
opacity:1;
filter:alpha(opacity=100);
background-color:#999999;
border: 1px solid white;
font-weight:bold;
}

h1 { font-size: 25px; }
h2 { font-size: 12px; }
h3 { font-size: 10px; position:fixed; bottom: 5px; left:0%; right:0%; font-weight:normal; }
h4 { font-size: 25px; text-transform:uppercase; }

navigationtext { font-weight:bold; text-transform:uppercase; }

&lt;/style&gt;
&lt;head&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;Celsius&lt;/td&gt;&lt;td&gt;Fahrenheit&lt;/td&gt;&lt;/tr&gt;
&lt;script type="text/javascript" src="temperatures.js"&gt;&lt;/script&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>And here is the external JavaScript file:</p>

<pre><code>var celsius = 0;
for (celsius = 0; celsius &lt;= 50; celsius) {
    document.write("&lt;tr&gt;&lt;td&gt;"+celsius+"&lt;/td&gt;&lt;td&gt;"+((celsius*9/5)+32)+"&lt;/td&lt;/tr&gt;");
    celsius++;
}
</code></pre>
