-1
In the code below, what will be the color of the paragraph?
p { color:red; }
p { color:blue; }
red or blue?
-1
In the code below, what will be the color of the paragraph?
p { color:red; }
p { color:blue; }
red or blue?
5
The CSS is interpreted from top to bottom, in this case the paragraph will be blue.
p { color: red; }
p { color: blue; }
<p>Teste</p>
if the declaration is used !important
, the paragraph shall be red.
p { color: red !important; }
p { color: blue; }
<p>Teste</p>
Browser other questions tagged css
You are not signed in. Login or sign up in order to post.
cannot put together a small test to prove which color will be?
– Ricardo Pontual
Why -1? I didn’t think it was fair... There are several questions about CSS rules but I haven’t seen one about repeating the same rule.
– Thiago Telles
well, it wasn’t me who gave the downvote, but it was probably as I put in the comment, lacked only "a hangover" to forehead and see the result, even if it is an interesting doubt
– Ricardo Pontual