Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8480161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:13:17+00:00 2026-06-10T19:13:17+00:00

I have a JavaScript assignment, and part of that assignment is having a two-column

  • 0

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.

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”.

And this is my code:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">
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; }

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

And here is the external JavaScript file:

var celsius = 0;
for (celsius = 0; celsius <= 50; celsius) {
    document.write("<tr><td>"+celsius+"</td><td>"+((celsius*9/5)+32)+"</td</tr>");
    celsius++;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:13:18+00:00Added an answer on June 10, 2026 at 7:13 pm

    Try like this.

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
    <table>
    <tr>
        <td>Celsius</td>
        <td>Fahrenheit</td>
    </tr>
    <script type="text/javascript" > //<![CDATA[
        for (var celsius = 0; celsius <= 50; celsius++) {
            document.write("<tr><td>"+ celsius +"</td>");
            document.write("<td>"+ ((celsius*9/5)+32) +"</td></tr>");
    }
    //]]></script>
    </table>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a javascript assignment and have just learned that I can do it
I have Javascript function defined in the main index.html file. One part of this
I have Javascript that opens another window and registers a click handler for all
I have JavaScript that is doing activity periodically. When the user is not looking
I have javascript code embedded inside a html template file. When I load this
I have javascript string variable with var sttr=We prefer questions that can be answered
I have some JavaScript/jQuery code that watches for the changed event on a checkbox:
I have an Action Method that returns a JSON-serialized object. The problem I'm having
I'm using Opera 11.50 and I have a JavaScript-function that works as a callback
I have this school assignment that I've been working on and am totally stumped

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.