8. naming your table

i have same problem like this. i just follow your instructions, but my problems is not fixed.

btw sorry my english is not good. i’m from asia :slightly_smiling:

you misspelled colspan.

oh my god. haha.
thanks stetim94.

1 Like

Codecademy write me: "Oops, try again. Did you add a colspan attribute to the th tag of the first row? "

Where is the error?

see the instructions, give it a value of 2, you clearly gave it the wrong value

I have corrected the value but the problem is the same:

please take a close look at your document structure, and how things in the table are suppose to be nested, it looks off.

If you need more help, post an updated version of your code (copy paste, no image please)

!DOCTYPE html
html
table border=“1px”
thead
title Table Time /title
/thead

body

tr th colspan=“2” Famous Monsters by Birth Year /th
/tr
tr
thFamous Monster/th
thBirth Year/th
/tr
/thead
tbody
tr
td King Kong /td
td1933 /td>
/tr

            tr
                td Dracula /td
                td 1897 /td
            /tr
            
            tr
                td Bride of Frankenstein  /td
                td  1935 /td
            /tr
        /tbody
    /table
    
/body

/html

what i have to do for copy html text without making a web page?

you mean on the forum? you have to use markup:

this will allow the html code and indent to be displayed normally without transforming

ok… i try:

<html>
<table border="1px">
    <thead>
        <title> Table Time </title>
    </thead>

    <tbody>
 <tr>   <th colspan="2"> Famous Monsters by Birth Year </th>
                </tr>
                <tr>
                    <th>Famous Monster</th>
                    <th>Birth Year</th>
                </tr>
            </thead>
            <body>
                <tr>
                    <td>King Kong</td>
                    <td>1933</td>  
                </tr>

                <tr>
                    <td>Dracula</td>
                    <td>1897</td>
                </tr>

                <tr>
                    <td>Bride of Frankenstein</td>
                    <td>1935</td>
                </tr>
            </tbody>
        </table>

    </body>

</html>

okay, first you should structure your html document:

<!DOCTYPE html>
<html>
<head><title>title</title></head>
<body>
</body>
</html>

then in your body you can add the table, inside the table you can add the table head and table body:

<body>
<table>
  <thead></thead>
  <tbody></tbody>
</table>
</body>

inside your table head you can add the rows with the th tags:

<thead>
<tr>   <th colspan="2"> Famous Monsters by Birth Year </th>
                </tr>
                <tr>
                    <th>Famous Monster</th>
                    <th>Birth Year</th>
                </tr>
            </thead>

the rest of the rows should go in your table body.

But i have destroyed the table!

‘’
‘<‘html>
‘<‘head> <‘title’> Table Time <’/title’> <’/head’>
‘<body’>
'<'table>
'<‘thead’>
‘<‘tr> <‘th colspan=“2”> Famous Monsters by Birth Year <’/th>
<’/tr>
<‘tr>
<‘th>Famous Monster<’/th>
<‘th>Birth Year<’/th>
<’/tr>
‘<’/thead>
<’/table>

          '  <'tr>
                <'td>King Kong</td'>
           '     <'td>1933</td>     
            <'/tr>
            
            <'tr>
                <'td>Dracula</td>
                <'td>1897</td>
            <'/tr>
            
            <'tr>
                '<'td>Bride of Frankenstein<'/td>'
                <'td>1935<'/td>
            <'/tr>
        <'/tbody>
    <'/table>
    
<'/body'>

<’/html’>

yea, because after your table head closing tag, there should the table body opening tag, and after the table body closing tag, you should close the table.

look at my example:

you can clearly see, i close the table after the table body.

it wont work i tryed

please make your own topic if you need help, use the template to make a good topic