9.Style that head!


#1



I don't understand why I cannot pass this exercise. What do I do wrong? It keeps saying: Oops, try again. Add a 'style' attribute to the first "th" tag! Set the value of this attribute to 'color:red;'


<html>
    <head>
        <title>Table Time</title>
    </head>
    
    <body>
        
        <table style="border-collapse:collapse;">
            <thead>
                <tr>
                    <th style="color:red;" colspan="2">Famous Monsters by 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;"><em>Birth Year</em></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>

</html>


#2

Ok, so the excercise was accepted after I added style attribute with color:red to the first "tr" tag as well. However, I still don't understand why it wasn't accepted earlier.

Passing code:

<thead>
                <tr style="color:red">
                    <th style="color:red" colspan="2">Famous Monsters by Birth Year</th>
                </tr>

#3

it should have passed earlier, seems you hit a glitch, good you get it to work in the end :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.