FIx the "Style that head" code


#1

Style that head Fix STAT!

https://www.codecademy.com/courses/web-beginner-en-f8mcL/1/4?curriculum_id=50579fb998b470000202dc8b

I dont understand this message"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 colspan="2">Famous Monsters by Birth Year</em></th>
                </tr>
                <tr style="border-bottom:1px solid black;">
                    <th style="padding:5px;color:red">Famous Monster</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>

</html>


#2

you should add a style attribute to this th tag:

<th colspan="2">

#3

Can you please clarify ?
Like this style=colspan"2"


#4

you know what the style attribute is right? If you don't remember maybe revisit some exercises from html basic2, here is an example of a style attribute:

<p style="font-size: 32px">

#5

I did as you said but it still doesn't want to take

~~~~~~~

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

</html>

~~~~~~~


#6

i still don't see a style attribute on this th tag:

<th colspan="2">

your <em></em> tags are also wrongly placed


#7

Thanks I got it now!

~~~~~~~





Famous Monsters by Birth Year
Famous Monster Birth Year
King Kong 1933
Dracula 1897
Bride of Frankenstein 1944
</body>


~~~~~~~


#8

what happened to your colspan? :open_mouth:


#9

I replaced it with the example given in the tab next to my editor,and it let me on to the next one...There is a bug in there


#10

um and can you also label where the result tab is i know its where the output it..just be useful cause it made me almost look around like a mad person looking for result. "Food for thought"


#11

but you can have multiply attributes (colspan and style) on a single html element.

There should be a output window on the right side of the editor.


#12

Ja I know but im just saying from the beginning it didn't mention "Result" only by HTML 3 it starting saying so. You get me ? But its coolerbagz. Just my opinion though.

I want to implement that but I am way passed this exercise now inside this discussion.


#13

2 posts were split to a new topic: Need help