4
I have the following very simple code
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
p#father {
color: red;
}
p#child {
color: inherit;
}
</style>
</head>
<body>
<p id="father">
pai
<p id="child">
filho
<p id="child2">
filho 2
</p>
</p>
</p>
</body>
</html>
What happens is it was for the tag with id#child
inherit the color: red
of the paragraph id#father
. And it doesn’t, because ?
I came to post the answer and you already had put exactly what I would put +1
– hugocsl
Whoa, thanks a colleague
– Leandro Nascimento