Assuming that your header is the tag properly said, read about this tag of HTML5 magnificent here.
The interaction between HTML and CSS allows you to add classes in tags HTML, as an example <header class="uma-classe"></header>, defining a class, with CSS, you can manipulate the style of the same, this style reflects in tag, consequently on the page.
.header {
background-color: #000;
color: #fff;
}
<body>
<header class="header">
<h1>Titulo do Cabeçalho</h1>
</header>
<section>
<h2>Titulo de uma seção</h2>
<p>Paragrafo de uma seção.</p>
</section>
<footer>
<a href="#">Link no rodapé.</a>
</footer>
</body>
Carlos, select your answer by adding some code, preferably the
HTMLpage so we can help you. Enjoy and make a tour by Stackoverflow pt.– Lucas Fontes Gaspareto
I did exactly as explained, and it just doesn’t work here. I edited the question and put the code
– Carlos Maia
Carlos, how are you declaring CSS ? You are importing a file into HTML or declaring it right on the page ?
– Lucas Fontes Gaspareto
I tested your code and it worked. If you’re declaring CSS on the HTML page, don’t forget to put it inside the <style></style> tags Also, don’t forget that the color you’re declaring is white, that is, if your background is white, you won’t see the kk changes
– Clayderson Ferreira