I have read the task description and checked my code thoroughly , but could not pass the step.
Still I get the error “Your first tr should have a th element.”
and errors for all other following steps as if nothing was added.
Help appreciated.
You seem to be solving the challenge in the wrong tr element.
You are supposed to add the th element in the user editable region which starts from line 35, but you are adding it on line 32.
Thank you. But no solution.
I have moved that line 3 lines below,
And on the other hand I have it on the first “tr” as a “th” element.
Further below it will not be the first “tr”.
I have even replicated the code line
“Cash This is the cash we currently have on hand.”
and put it to the next “tr” element, but none of the errors has changed.
What would you suggest?
Sure, thank you for your return.
I did not delete the dummy duplicates as well. Here you are:
/* …
<thead>
<tr>
<td></td>
<th><span class="sr-only year">2019</span></th>
<th><span class="sr-only year">2020</span></th>
<th class="current"><span class="sr-only year">2021</span></th>
<th>Cash <span class="description">This is the cash we currently have on hand.</span></th>
<td>$25</td>
<td>$30</td>
<td class="current">$28</td>
</tr>
</thead>
<tbody>
<tr class="data">
</tr>
<tr class="data">
<th>Cash <span class="description">This is the cash we currently have on hand.</span></th>
</tr>
<tr class="data">
… */
And so are the errors, in case you need them. :
Your first tr should have a th element.
Your th element should have the text Cash This is the cash we currently have on hand…
You should wrap the text This is the cash we currently have on hand. in a span element.
Your span element should have the class attribute set to description.
You should have three td elements.
Your first td element should have the text $25.
Your second td element should have the text $30.
Your third td element should have the text $28.
Your third td element should have the class set to current.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
I have reset the step and wrote it over again.
Nothing changed. Still the first error is
" Your first tr should have a th element. " and 8 more follow.
My code is as follows :
OK, it worked.
Thank you all.
Then again, I find it confusing, when the instruction is “add it to the first tr element”.
So I go and find the first tr element.
I am not an expert coder yet and cannot differentiate between and as explicitly as you do.
Thanks again and be well.
the implicit is “the first tr in the editable region”, the isntructions always refer to the highlighted part, you don’t need to go search for code outside that part