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 am having trouble with a C++ code that I'm working on. It is a spell...
I am having trouble with a C++ code that I'm working on. It is a spell checker program. It needs to compare two arrays, a dictionary, and an array with misspelled strings that are compared to the strings in the dictionary. the strings that are in the second array that is not in the Dictionary are assumed to be misspelled. All of the strings in the dictionary are lowercase without any extra characters so the strings that are passed into...
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 with my do while loop. I'm trying to get it where if the...
I'm having trouble with my do while loop. I'm trying to get it where if the user enter's 3 after whatever amount of caffeinated beverages they've entered before then the loop will close and the rest of my code would proceed to execute and calculate the average price of all the caffeinated beverages entered. Can someone please help me with this? Here's my Code: import java.util.Scanner; public class Main { public static void main(String[] args) { CaffeinatedBeverage[] inventory = new...
I'm having trouble understanding the following code (a snippet of a code). What does it do?...
I'm having trouble understanding the following code (a snippet of a code). What does it do? The whole code is about comparing efficiencies of different algorithms. def partition(list,first,last): piv = list[first] lmark = first+1 rmark = last done = False while not done: while lmark <= rmark and list[lmark]<=piv: lmark=lmark+1 while list[rmark]>=piv and rmark>=lmark: rmark=rmark-1 if rmark<lmark: done = True else: temp = list[lmark] list[lmark]=list[rmark] list[rmark]=temp temp = list[first] list[first]=list[rmark] list[rmark]=temp return rmark
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...
I'm having trouble trying to create the italian, polish, and netherlands flag in C Here's my...
I'm having trouble trying to create the italian, polish, and netherlands flag in C Here's my code so far: #include<stdio.h> int main(){    int country_choice;    fprintf(stderr, "Enter the country_code of the chosen flag.(1 for Poland, 2 for Netherlands, 3 for Italy)");    fscanf(stdin, "%d", &country_choice);    switch (country_choice) { case 1: printf("Poland Flag\n"); printf("%c%c%c", 255,255,255); printf("%c%c%c", 220,20,60);    break;       case 2: printf("Italian Flag\n"); printf("%c%c%c", 0,146,70); printf("%c%c%c", 225,255,255); printf("%c%c%c", 206,43,55); break;    case 3: printf("Netherlands Flag\n"); printf("%c%c%c", 174,28,40);...
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...
I'm having trouble figuring out the constraints to this problem. I know that I am maximizing...
I'm having trouble figuring out the constraints to this problem. I know that I am maximizing 55x + 45y, however the variables are throwing me off. I only need help on question #1 as it would be a great help to understanding the rest of what the questions are asking. The problem is as follows: NorCal Outfitters manufactures a variety of specialty gear for outdoor enthusiasts. NorCal has decided to begin production on two new models of crampons: the Denali...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT