There are actually two things at work here.
1. Body margins
By default, the body has margins of around 5px(ish). Most of the answers on here have already covered that. You can fix it by setting them to 0;
body
{
margin: 0;
}
2. <h1>
ALSO has margins
Your header is being pushed down by the margins on your <h1>
element. Remove the top margins to fix it.
h1
{
margin-top: 0;
}