0

See code below.

I have not explicitly set background-color on html parent, so why does it get bg color of its child ?!

/* uncomment to see
html {
  background-color:orange;
}*/
body {
  background-color:hotpink;
  border: 1px dashed red;
}
<html>
  <body>
    body<br/>
    <p> hey some random para</p>
  </body>
</html>
joedotnot
  • 4,810
  • 8
  • 59
  • 91

0 Answers0