Knowee
Questions
Features
Study Tools

Fill in the gaps in the HTML below to create the Table of data shown below._____________________________________________  <html lang="eng"><head>    <title>Table </head><body>   <table>      <caption>Drink Preference by Age</caption>      <tr><th>Preference</th> <td> </td> <td>25-29</td> <td>30-39</td> <td>40-49</td> <td>50-54</td> </tr>      <tr><td>Cocao-Cola</td> <td>65</td> <td>41</td><td>55</td> <td>28</td> <td>46</td> </tr>      <tr><td>Diet Coke</td> <td>2</td> <td>10</td> <td>13</td> <td>15</td> <td>8</td> </tr>      <tr><td>Coke Zero</td> <td>9</td> <td>23</td> <td>19</td> <td>22</td> <td>28</td>    </table>   </html>

Question

Fill in the gaps in the HTML below to create the Table of data shown below._____________________________________________  <html lang="eng"><head>    <title>Table </head><body>   <table>      <caption>Drink Preference by Age</caption>      <tr><th>Preference</th> <td> </td> <td>25-29</td> <td>30-39</td> <td>40-49</td> <td>50-54</td> </tr>      <tr><td>Cocao-Cola</td> <td>65</td> <td>41</td><td>55</td> <td>28</td> <td>46</td> </tr>      <tr><td>Diet Coke</td> <td>2</td> <td>10</td> <td>13</td> <td>15</td> <td>8</td> </tr>      <tr><td>Coke Zero</td> <td>9</td> <td>23</td> <td>19</td> <td>22</td> <td>28</td>    </table>   </html>

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here is the corrected HTML code:

<html lang="eng">
<head>
    <title>Table</title>
</head>
<body>
    <table>
        <caption>Drink Preference by Age</caption>
        <tr>
            <th>Preference</th>
            <th>18-24</th>
            <th>25-29</th>
            <th>30-39</th>
            <th>40-49</th>
            <th>50-54</th>
        </tr>
        <tr>
            <td>Cocao-Cola</td>
            <td>65</td>
            <td>41</td>
            <td>55</td>
            <td>28</td>
            <td>46</td>
        </tr>
        <tr>
            <td>Diet Coke</td>
            <td>2</td>
            <td>10</td>
            <td>13</td>
            <td>15</td>
            <td>8</td>
        </tr>
        <tr>
            <td>Coke Zero</td>
            <td>9</td>
            <td>23</td>
            <td>19</td>
            <td>22</td>
            <td>28</td>
        </tr>
    </table>
</body>
</html>

The missing part was the age group "18-24" in the table header. I added it as a <th> element in the first row.

This problem has been solved

Similar Questions

Which of the following HTML code snippets will generate the following table?<table border="1"> <tr> <th>Name</th> <th>Score</th> </tr> <tr> <td>Karel</td> <td>32</td> </tr></table><table border="1"> <tr> <td>Name</td> <td>Score</td> </tr> <tr> <td>Karel</td> <td>32</td> </tr></table><table border="1"> <tr> Name Score </tr> <tr> Karel 32 </tr></table><table border="1"> <th>Name</th> <th>Score</th> <td>Karel</td> <td>32</td> </tr></table>

How do you create a table in HTML?<table> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> </table><tbl> <row> <column>Cell 1</column> <column>Cell 2</column> </row> </tbl><tab> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> </tab><table> <row> <cell>Cell 1</cell> <cell>Cell 2</cell> </row> </table>

Question: 3Which of the following HTML code snippets will generate the following table?

Choose the correct HTML code for below structure :A. <table><tr><th>Languages</th><th>Proficiency</th></tr><tr><td>C++</td><td>Java</td><td>Javascript</td></tr><tr><td>Beginner</th><td>Intermediate</td><td>Advanced</td></tr></table>B. <table><tr><td>Languages</td><td>C++</td><td>Java</td><td>Javascript</td></tr><tr><td>Proficiency</td><td>Beginner</th><td>Intermediate</td><td>Advanced</td></tr></table>​C. <table><th><td>Languages</td><td>C++</td><td>Java</td><td>Javascript</td></th><tr><td>Proficiency</td><td>Beginner</th><td>Intermediate</td><td>Advanced</td></tr></table>D. <table><tr><th>Languages</th><td>C++</td><td>Java</td><td>Javascript</td></tr><tr><th>Proficiency</th><td>Beginner</th><td>Intermediate</td><td>Advanced</td></tr></table>

Use a slicer to filter the data in this table to show only rows where the Category value is Coffee or Meals.

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.