Question

In: Computer Science

I'm having trouble with validating this html code. Whenever I used my validator, it says I...

I'm having trouble with validating this html code. Whenever I used my validator, it says I have a stray end tag: (tbody) from line 122 to 123. It's the last few lines. Thanks and Ill thumbs up whoever can help solve my problem.

Here's my code:


<!DOCTYPE html>
<html lang="en">
<head>
<title>L7 Temperatures Fields</title>
<!--
   Name:
   BlackBoard Username:
   Filename: (items left blank for bb reasons
   Class Section: (blank)
   Purpose: Making a table to demonstrate my ability in the use of table data-->
<meta charset = "utf-8" />
<style>
table , th, td {
   border: 2px solid black;
   border-collapse: collapse;
}
</style>
</head>
<table>
<thead>
<tr>
<th colspan = "1" scope = "col">Month</th>
   <th colspan = "1" scope = "col">High</th>
   <th colspan = "1" scope = "col">Low</th>
   </tr>
</thead>
<tbody>
  
  
   <tr>
   <th colspan = "3"> Winter Season</th>
   </tr>
  
  
   <tr>
   <td>December</td>
   <td>56</td>
   <td>37</td>
   </tr>
   <tr>
   <td>January</td>
   <td>51</td>
   <td>31</td>
   </tr>
   <tr>
   <td>February</td>
   <td>55</td>
   <td>34</td>
   </tr>
  
  
   <tr>
   <th colspan = "3"> Spring Season</th>
   </tr>
  
   <tr>
   <td>March</td>
   <td>62</td>
   <td>40</td>
   </tr>
   <tr>
   <td>April</td>
   <td>73</td>
   <td>50</td>
   </tr>
   <tr>
   <td>May</td>
   <td>82</td>
   <td>60</td>
   </tr>
  
   <tr>
   <th colspan = "3"> Summer Season</th>
   </tr>
  
   <tr>
   <td>June</td>
   <td>89</td>
   <td>67</td>
   </tr>
   <tr>
   <td>July</td>
   <td>92</td>
   <td>71</td>
   </tr>
   <tr>
   <td>August</td>
   <td>89</td>
   <td>70</td>
   </tr>
  
   <tr>
   <th colspan = "3"> Autumn Season</th>
   </tr>
  
   <tr>
   <td>September</td>
   <td>84</td>
   <td>65</td>
   </tr>
   <tr>
   <td>October</td>
   <td>73</td>
   <td>52</td>
   </tr>
   <tr>
   <td>November</td>
   <td>61</td>
   <td>40</td>
   </tr>
  
   <tfoot>
   <tr>
   <th colspan = "3">12 Month Average Temperatures (Year)</th>
   </tr>
   <tr>
   <td>72</td>
       <td>51</td>
       <td></td>
   </tr>
   </tfoot>
</tbody>
</table>

Solutions

Expert Solution

An HTML table with a <thead>,<tbody>,<tfoot> different elements.

So, You have to close the <tbody> element before the <tfoot> element. But you closed after the <tfoot> element so validater says I have a stray end tag: (tbody) from line 122 to 123.

Once we can validate the below program then you can get valid results.

<!DOCTYPE html>
<html lang="en">
<head>
<title>L7 Temperatures Fields</title>
<!--
Name:
BlackBoard Username:
Filename: (items left blank for bb reasons
Class Section: (blank)
Purpose: Making a table to demonstrate my ability in the use of table data-->
<meta charset = "utf-8" />
<style>
table , th, td {
border: 2px solid black;
border-collapse: collapse;
}
</style>
</head>
<table>
<thead>
<tr>
<th colspan = "1" scope = "col">Month</th>
<th colspan = "1" scope = "col">High</th>
<th colspan = "1" scope = "col">Low</th>
</tr>
</thead>
<tbody>
  
  
<tr>
<th colspan = "3"> Winter Season</th>
</tr>
  
  
<tr>
<td>December</td>
<td>56</td>
<td>37</td>
</tr>
<tr>
<td>January</td>
<td>51</td>
<td>31</td>
</tr>
<tr>
<td>February</td>
<td>55</td>
<td>34</td>
</tr>
  
  
<tr>
<th colspan = "3"> Spring Season</th>
</tr>
  
<tr>
<td>March</td>
<td>62</td>
<td>40</td>
</tr>
<tr>
<td>April</td>
<td>73</td>
<td>50</td>
</tr>
<tr>
<td>May</td>
<td>82</td>
<td>60</td>
</tr>
  
<tr>
<th colspan = "3"> Summer Season</th>
</tr>
  
<tr>
<td>June</td>
<td>89</td>
<td>67</td>
</tr>
<tr>
<td>July</td>
<td>92</td>
<td>71</td>
</tr>
<tr>
<td>August</td>
<td>89</td>
<td>70</td>
</tr>
  
<tr>
<th colspan = "3"> Autumn Season</th>
</tr>
  
<tr>
<td>September</td>
<td>84</td>
<td>65</td>
</tr>
<tr>
<td>October</td>
<td>73</td>
<td>52</td>
</tr>
<tr>
<td>November</td>
<td>61</td>
<td>40</td>
</tr>
  
</tbody>
<tfoot>
<tr>
<th colspan = "3">12 Month Average Temperatures (Year)</th>
</tr>
<tr>
<td>72</td>
<td>51</td>
<td></td>
</tr>
</tfoot>
</table>

NOTE:***I hope you understand my answer if you have any doubts please comment me.......Thank you......*****


Related Solutions

I'm having trouble with my ZeroDenominatorException. How do I implement it to where if the denominator...
I'm having trouble with my ZeroDenominatorException. How do I implement it to where if the denominator is 0 it throws the ZeroDenominatorException and the catch catches to guarantee that the denominator is never 0. /** * The main class is the driver for my Rational project. */ public class Main { /** * Main method is the entry point to my code. * @param args The command line arguments. */ public static void main(String[] args) { int numerator, denominator =...
I'm having trouble understanding a CS assignment. I would appreciate it if you all code do...
I'm having trouble understanding a CS assignment. I would appreciate it if you all code do this for me. The template for the lab is below which you must use. You're only supposed to create/edit the product function. The assignment has to be written in asm(Mips) You will need to create a NOS table and use the structure below and write a function called product. The structure used in this program is: struct Values { short left; short right; int...
I'm having a very hard time getting this c++ code to work. I have attached my...
I'm having a very hard time getting this c++ code to work. I have attached my code and the instructions. CODE: #include using namespace std; void printWelcome(string movieName, string rating, int startHour, int startMinute, char ampm); //menu function //constants const double TICKET_PRICE = 9.95; const double TAX_RATE = 0.095; const bool AVAILABLE = true; const bool UNAVAILABLE = false; int subTotal,taxAdded, totalCost; // bool checkAvailability( int tickets, int& seatingLeft){ //checks ticket availability while(tickets > 0 || tickets <= 200) //valid...
Using dev c++ I'm having trouble with classes. I think the part that I am not...
Using dev c++ I'm having trouble with classes. I think the part that I am not understanding is sending data between files and also using bool data. I've been working on this program for a long time with many errors but now I've thrown in my hat to ask for outside help. Here is the homework that has given me so many issues: The [REDACTED] Phone Store needs a program to compute phone charges for some phones sold in the...
Hey! I'm having trouble answering this for my assignment. Thank you so much in advance. 1)...
Hey! I'm having trouble answering this for my assignment. Thank you so much in advance. 1) Which type of vessels, arteries or veins, has more muscle fibers? What is the functional significance of this? 2a) In general, we have no conscious control over smooth muscle or cardiac muscle function, whereas we can consciously control to some extent all skeletal muscles. Can you consciously control your breathing? What does this tell you about the muscle type of the diaphragm? 2b) What...
If anyone could simplify this for me. I'm having trouble understanding the material and I just...
If anyone could simplify this for me. I'm having trouble understanding the material and I just need a keep it simple stupid approach Discuss the various non influential as well as influential investments that company may have on their financial statements. Also compare and contrast how they are treated/recorded on the companies financial statements.
Validating Input file, So for my C++ assignment, my professor says we need to validate the...
Validating Input file, So for my C++ assignment, my professor says we need to validate the Input File, Which means, if the line is missing a comma, one of the 3 information, or the string is a white line, it will ignore it. If the line has a white line, the program will correct it and will read in the line. I will store these into an Array, and display them in First name, Last name, and Number of Votes...
I have a group project (Cost Benefit Analysis / ROI) that I'm having trouble with two...
I have a group project (Cost Benefit Analysis / ROI) that I'm having trouble with two parts- Competitive Analysis & Conclusion The topic is - To develop training programs internally instead of sending employees to external training providers Company Type - Healthcare organization Competitive Analysis: Summarize the experience other companies are having with this type of investment *This is what I had in mind but need further help please: How are other potential health organizations dealing with having a new...
I'm having trouble thinking of a way that I can delete duplicates from a c string...
I'm having trouble thinking of a way that I can delete duplicates from a c string of alphabets. So what I'm supposed to do is I'm supposed to delete the repeated letters in the c string using pointers and also dynamically allocating space. I'm guessing that I will have to dynamically allocate space for an array to put in the letters that only appear once. To do that, can I create 2 pointers in a function and have 1 pointer...
I have an error on my code. the compiler says 'setLastName' was not declared in this...
I have an error on my code. the compiler says 'setLastName' was not declared in this scope. this is my code : #include <iostream> using std::cout; using std::cin; using std::endl; #include <string> using std::string; class Employee {    public :               Employee(string fname, string lname, int salary)        {            setFirstName(fname);            setLastName(lname);            setMonthlySalary(salary);        }               void setFirstName(string fname)        {       ...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT