<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <title>Sample</title>
  </head>
  <body>
    <div class="main">
      <header>
        <div class="header__inner">
          <div class="logo">
            <img src="https://branding-creator.com/wp-content/uploads/2020/10/blog_logo.png" alt="ブログロゴ">
          </div>
        </div>
        <nav>
          <ul>
            <li><a href="#">HOME</a></li>
            <li><a href="#">ABOUT</a></li>
            <li><a href="#">CONTACT</a></li>
          </ul>
        </nav>
      </header>      
      <div class="container">
        <h1 class="title mt-100">はじめてのHTML</h1>
        <div class="main__inner">
          <img src="http://branding-creator.com/wp-content/uploads/2020/10/hp-ope1-3.jpg">
          <h2 class="mt-50">HTMLについて</h2>
          <p>HTMLは覚えることが少ない言語で、とても簡単です。<br>
            1週間もあれば簡単な操作は誰でも覚えられてしまうので、毎日少しずつ触ってみましょう。
          </p>
          <h3 class="mt-50">上達のポイント</h3>
          <ol>
            <li>毎日1分でも触ってみる</li>
            <li>わからなくても一つのセクションで止まらず、どんどん先に進める</li>
            <li>わからないことはこまめに調べる</li>
          </ol>
        </div>
      </div>
      <footer>
        <div class="footer__nav">
          <ul>
            <li><a href="#">HOME</a></li>
            <li><a href="#">ABOUT</a></li>
            <li><a href="#">CONTACT</a></li>
          </ul>
        </div>
      </footer>
    </div>
  </body>
</html>
h1 {
  text-align: center;
  font-size: 3rem;
  border-bottom: 3px dashed #aaa;
}
h2 {
  font-size: 2rem;
  line-height: 2em;
  padding-left: 0.5em;
  border-left: 1em solid #0ebeff;
  background-color: #def6ff;
}
a {
  color: #999;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}
a:hover {
  color: white;
  background-color: #85bbea;
}
p {
  padding-left: 2em;
  line-height: 2.25rem;
}
ul {
  list-style: none;
}
ol {
  padding: 2em 4em;
  background-color: #ccc;
}
ol li {
  line-height: 2em;
  padding-left: 0.5em;
}

.mt-50 {
  margin-top: 50px;
}
.mt-100 {
  margin-top: 100px;
}

.main {
  width: 100%;
}
header {
  background-color: #eee;
  position: relative;
  padding: 20px 10%;
  box-shadow: 0 5px 10px #aaa;
}
.header__inner {
  width: 80%;
}
.logo img {
  width: 300px;
}

nav {
  position: absolute;
  top: 10%;
  right: 50px;
}
nav ul {
  display: flex;
}
nav a {
  border-left: 1px solid #000;
  padding: 1em 2em;
}
nav li:last-child a {
  border-right: 1px solid #000;
}

.container {
  width: 80%;
  margin: 0 auto;
}
.container img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.main__inner {
  padding: 50px;
  background-color: #eee;
  border-radius: 10px;
  box-shadow: 0 10px 20px #999;
}

footer {
  display: flex;
  flex-wrap: wrap;
  margin-top: 50px;
  height: 150px;
  background-color: #ddd;
  align-items: center;
  justify-content: center;
}
.footer__nav a {
  border-bottom: 2px solid #ddd;
  padding: 1em 2em;
}
.footer__nav a:hover {
  background-color: transparent;
  color: #000;
  border-bottom: 2px solid #000;
}
.footer__nav ul {
  display: flex;
  justify-content: center;  
  width: 50%;
  margin: 0 auto;
  padding-left: 0;
}
.footer__nav ul li {
  padding: 1em 2em;
  margin: 0 auto;
}

@media screen and (max-width:700px) {
  nav {
    position: unset;
    width: 100%;
  }
  .header__inner {
    margin: 0 auto;
  }
  .logo {
    text-align: center;
  }
  .logo img {
    width: 100%;
  }
  nav ul {
    padding-left: 0;
    font-size: 13px;
    flex-direction: column;
  }
  nav ul li {
    margin: 0 auto;
    width: 100%;
  }
  nav ul li a {
    border-left: unset;
    display: block;
    text-align: center;
  }
  nav li:last-child a {
  border-right: unset;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.