What have i done wrong? HTML BASICS 3 style that head


#1




<body>

    <table style="border-collapse:collapse;">
        <thead>
            <tr>
                <th colspan="2">Famous Monsters and Birth Year</th>
            </tr>
            <tr style="border-bottom:1px solid black;">
               <em <th style="padding:5px;">Famous Monster</th> </em>
                <th style="padding:5px;border-left:1px solid black;">Birth Year</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td style="padding:5px;">King Kong</td>
                <td style="padding:5px;border-left:1px solid black;">1933</td>     
            </tr>

            <tr>
                <td style="padding:5px;">Dracula</td>
                <td style="padding:5px;border-left:1px solid black;">1897</td>
            </tr>

            <tr>
                <td style="padding:5px;">Bride of Frankenstein</td>
                <td style="padding:5px;border-left:1px solid black;">1944</td>
            </tr>
        </tbody>
    </table>

</body>


#2

This does not look right. The outer tags should be <th>...</th> with the <em> ... </em> wrapping the text inside.


#3

OK... Now i get what they are saying. Thank you for the reply!!


#4

Also, I tried doing the red text separately, Is this a bug or is it just me?


#5

Can you show us how you tried the red text?


#6

OK, let me pull it up


#7

It will take a second, im out of town with slow internet


#8

Ok, here it is. I have it finished now but now its out of position, or is this normal?



<body>

    <table style="border-collapse:collapse;">
        <thead>
            <tr>
                <th colspan="2"><th style=" color:red">Famous Monsters and Birth Year</th>
            </tr>
            <tr style="border-bottom:1px solid black;">
               <th style="padding:5px;"><em>Famous Monster</em></th> 
                <th style="padding:5px;border-left:1px solid black;">Birth Year</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td style="padding:5px;">King Kong</td>
                <td style="padding:5px;border-left:1px solid black;">1933</td>     
            </tr>

            <tr>
                <td style="padding:5px;">Dracula</td>
                <td style="padding:5px;border-left:1px solid black;">1897</td>
            </tr>

            <tr>
                <td style="padding:5px;">Bride of Frankenstein</td>
                <td style="padding:5px;border-left:1px solid black;">1944</td>
            </tr>
        </tbody>
    </table>

</body>


#9

colspan and style are both attributes which you can add too the <th> opening tag, so something like this:

<th colspan="" style="">

No need to have two <th> opening tags


#10

Is that why the title is in the middle of the page?


#11

Yea, colspan + th is causing for the center of the title.


#12

Ok, thanks for the reply!