How To Create a Simple, yet Responsive Header

How To Create a Simple, yet Responsive Header

Without saying anything extra here is a direct example of an HTML header section styled with CSS for your website.

<!DOCTYPE html>
<html>
  <head>
    <title>BloggerWomen</title>
    <style>
      header {
        background-color: #0f0c0cea;
        color: #fff;
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      h1 {
        color: #6a7a18;
        margin: 0;
      }
      nav div {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        margin-right: 20px;
      }
      nav div:last-child {
        margin-right: 0;
      }
      nav a {
        color: #fff;
        text-decoration: none;
        padding: 10px;
      }
      nav a:hover {
        background-color: #6a7a18;
        border-radius: 40%;
        color: #0f0c0cea;
      }
    </style>
  </head>
  <body>
    <header>
      <h1>BloggerWomen</h1>
      <nav>
        <div>
          <div><a href="#home">Home</a></div>
          <div><a href="#about">About</a></div>
          <div><a href="#blog">Blog</a></div>
          <div><a href="#contact">Contact</a></div>
        </div>
      </nav>
    </header>
    <section>
      <!-- The main content of your website -->
    </section>
    <footer>
      <!--  footer content of your website -->
    </footer>
  </body>
</html>

We have introduced CSS styles to the html header in this code. Using basic styling properties such as background color, margin, and padding of CSS we have designed a header.

You can alter the CSS styles to achieve the appearance and feel that you prefer.