Build an Availability Table - Build an Availability Table

Tell us what’s happening:

I need help with user stories 1,2,3 where I added 3 columns and 5 rows as per user story 1 while including headers in my rows as story one suggests,but story 2 and 3 bring about some confusion since they require header cells on top of the cells I have already which will increase my columns more than the requested 3 remembering that my rows also have a header as story 1 requested

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Availability Table</title>
    <link rel="stylesheet" href="styles.css">
</head>

<body>
<table>
    
<thead>
 <tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>

<tbody >
    <tr>
        <th></th>
    <th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
    </tr>
<tr><th></th></tr>
<tr><th></th></tr>
<tr><th></th></tr>
<tr><th></th></tr>
</tbody>

<tfoot>
    
</tfoot>
</table>

</body>

</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36

Challenge Information:

Build an Availability Table - Build an Availability Table

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-availability-table/66b36358ed4f261d64840c24.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hi @Allan1

Shouldn’t the days of the week appear in the thead element?

The tbody should have td elements, and no th elements.

Happy coding

Can we go through this step by step please. q1 where I should have 3 columns and 5 rows with headers included.Can we agree I have done that?

each of your rows only have one column, so no you haven’t

so am supposed to have three columns in each row right?

Hi @Allan1

A minimum of three columns in each row. Since there are five days in a weekday, you could have five columns in every row.

Happy coding

now here is the part am finding quite tricky.On the third user story where the first column should have table header cells with a class of time containing time values as their text.
if a column can be created by th or td elements in a tr element q3 suggests we add more columns since you cant nest th in a th or how is the column supposed to have more header cells without creating more columns

Hi @Allan1

  1. The first column should have table header cells with a class of time containing time values as their text.

Try copying and pasting the tr element containing the days of the week headers.

Change the th elements to td elements and remove the text.

This way the head and body of the table have the same number of row elements.

Happy coding