Problem with a gap

Hi i don’t know how to remove that gap between header and nav

<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <title>Strona testowa</title>
</head>

<body>
    
<header>
<h1>Html</h1>    
</header>  
    
<nav>

   <ul>
   <li>Home</li>
    <li>Portfolio</li> 
       <li>Contact</li> 
       <li>About</li> 
       <li>Offices</li> 
       
   </ul>
    
</nav>    
    
    
</body>
</html>

html,body
{
background-color:#505050;
font-family: 'Roboto', sans-serif;
margin:0;
}
header
{
text-align:center;
background-color:#00FA9A;
padding:10px;

}
h1
{
font-size:56px;
}
nav
{
background-color:#FF6347;
}
nav > ul 
{
display:flex;
}


It’s because of the default style of nav tag. Try to add margin-top:0px; to nav > ul

Your CSS should be like this:

nav > ul 
{
display:flex;
margin-top: 0px;
}

Thank you very much :heart: :heart: :heart: :heart: :heart: :heart: