<!DOCTYPE html> <html> <head> <title></title> </head> <body style="background-color: blue;margin:0px"> <div style="background-color: red; height: 100px"> <div style="background-color: yellow; height: 50px;margin:10px"> </div> </div> </body> </html>
The second DIV tag is inside the first DIV tag. I was expecting the margin of the second DIV tag will be completely inside the first DIV tag. Why I can see some top margin between the first DIV tag and the body? why top margin of the second DIV goes out of first DIV tag?
This is my first post. Please help me.