'Div'ide and Conquer

Can someone tell me what is wrong with this?

<!DOCTYPE html>
<html>
	<head>
		<title>Result</title>
	</head>
	<body>
		<div style="width:50px; height:50px; background-color:red"></div>
		<div style="width:50px; height:50px; background-color:blue"></div>
		<div style="width:50px; height:50px; background-color:green"></div>
	        <div style="width:50px; height 50px; background-color: yellow"></div>
	</body>
</html>

last div, you forgot a colon after height

1 Like

Nevermind figresd it out

Can you also tell me how to do this?

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

The instructions are…
Make the “Famous Monster” and “Birth Year” labels emphasized (i.e. make them italicized).
Make the “Famous Monsters by Birth Year” title red.

what have you tried? Or what is it you are struggling with? (this looks like the code you started with), no offense, but i would like to see what you tried first

I can’t figure out how to style with a colspan already there

that i can understand, both (colspan and style) are attributes, you can add multiply attributes to a element by simple seperating them by a space. Like so:

<img src="#" alt="my_image">

now, knowing this, i think you can answer that question

Thank you This is what i ended up with

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

frankly i think this line can use an upgrade:

when they said: inside, they mean to say do the following:

<th style="padding:5px;"><em>Famous Monster</em></th>

nest the em tags on the inside of the <th></th> tags, same for the line below

<!DOCTYPE html>
<html>
	<head>
		<title>Result</title>
	</head>
	<body>
		<div style="width:50px; height:50px; background-color:red"></div>
		<div style="width:50px; height:50px; background-color:blue"></div>
		<div style="width:50px; height:50px; background-color:green"></div>
        <div style="width:50px; height:50px; backround-color:yellow"></div>	
	</body>
</html>

can you please tell me whats wrong? Thanks!

Please read this post about markdown so your code/indent will show.

Your 4th div, you misspelled background