Just look at the picture below. I don't know why the header (blue block) has gone down a little bit. I mean, the blue block should exactly touch the end of the content area of the browser. Some people told me that is because of the margin of h1. But I think this margin can only cause h1 to go down a little bit inside the blue block instead of making the entire blue block go down. Who can help me? Thanks a lot!
Sorry, the code is now added below.
<!DOCTYPE html>
<html>
<head>
<title>just for test</title>
<style>
body,html {
margin: 0;
}
header {
background-color: blue;
height: 200px;
width: 1200px;
margin: 0 auto;
text-align: center;
padding: 0;
}
h1 {
color: white;
}
</style>
</head>
<body>
<header>
<h1>Why does it have to be like this?</h1>
</header>
</body>
</html>