8. naming your table


#1

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:


8.Naming your table- Help
#2

you misspelled colspan.


#3

oh my god. haha.
thanks stetim94.


#4

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

Where is the error?


#5

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


#6

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


#7

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)


#8

!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


#9

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


#10

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

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


#11

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>

#12

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.


#13

But i have destroyed the table!

''
'<'html>
'<'head> <'title'> Table Time <'/title'> <'/head'>
'
'<'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'>


#14

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.


#15

it wont work i tryed


#16

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