margin in background color or image
hi all in follow file i have two div. second div has background-image. why when set margin-top to <p> tag background-image get margin? *** <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .sec1 { height: 100px; background-color: brown; } .sec2 { height: 100vh; /* background-image: url(./images/showcase.jpg); */ background-color: aqua; background-size: cover; } p { margin-top: 100px; } </style> </head> <body> <div class="sec1"></div> <div class="sec2"> <p>Hello</p> </div> </body> </html>