Could someone please take a look at this? I’ve been stressing out over the table headings lesson for over an hour to no avail. Could someone let me know what im doing wrong? https://www.codecademy.com/courses/learn-html/lessons/tables/exercises/table-headings this is the lesson.
I’ve also seen something about a tag but it mentions nothing about this in the lesson.
The empty TH element could be the problem.
I only did that because the lesson on the left had put it too.
However I’ve tried it without and still doesn’t work.
At some point the instructions might have asked for a THEAD?
<table> <thead> <tr> <th>Company Name</th> <th>Number of Items to Ship</th> <th>Next Action</th> </tr> </thead>
Ive gone back through the instructions twice and it at no point mentioned a thead, however the solution you just gave me worked so i’ll make a note of it and carry on with the lessons. Thankyou very much sir.
I’m answering for posterity to help other learners. The example uses an empty
<th> to create a blank space in the upper left corner. This will create a table like below.
Just to add: I think the example mentions the empty TH for this reason:
The blank heading creates the extra table cell necessary to align the table headings correctly over the data they correspond to.
Which stumbled me up as well. Remove that empty TH and the lesson completes.
Perhaps the lesson/example needs updating.
The lesson may complete but the outcome will be a malformed table.
For all the beginners out there, I would like to tell you that you must add border=1 inside the