LP向けのHTML5テンプレート 「SIMPLE LP TEMPLATE」のイメージ

LP向けのHTML5テンプレート 「SIMPLE LP TEMPLATE」

  • HTML
  • CSS
  • PARTS

カスタマイズする前提でシンプルな構成にしたLP向けのHTML5テンプレート
「SIMPLE LP TEMPLATE」を作りました。

HTMLとCSSのみでベースとなるよう作っていますので、
ご利用の用途にあわせてJavaScriptなど追加すれば
LP(ランディングページ)の土台として利用しやすと思います。

目次

実装した結果

実際のコードと解説

HTMLおよびCSSそれぞれのコードは以下のとおりです。

HTML

HTMLは必要最小限の構成です。
それぞれのセクションは3つですが適宜追加いただければと思います。

<!DOCTYPE html>
<html lang="ja">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="format-detection" content="telephone=no">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/png" href="fav.png">
  <link rel="apple-touch-icon" sizes="180x180" href="icon.png">
  <title>ページのタイトル</title>
  <link rel="stylesheet" href="assets/css/style.css">
  <link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP:400,700&display=swap" rel="stylesheet">
  <link rel="canonical" href="ここに正規化するURL" />
  <meta name="description" content="ページの解説">
  <meta property='og:locale' content="ja_JP">
  <meta property="fb:app_id" content="Facebook App ID" />
  <meta property='og:site_name' content="サイトのタイトル">
  <meta property='og:title' content="ページのタイトル">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="ツイッターアカウント">
  <meta property="og:description" content="ページの解説">
  <meta property="og:url" content="ページのURL">
  <meta property="og:type" content="website">
  <meta property="og:image" content="シェアされたときに表示する画像"> </head>
<body>
  <header class="header">
    <h1 class="header__ttl">SIMPLE LP TEMPLATE</h1>
    <nav class="gnav">
      <ul class="gnav__list">
        <li class="gnav__item"><a class="gnav__link" href="#about">ABOUT</a></li>
        <li class="gnav__item"><a class="gnav__link" href="#price">PRICE</a></li>
        <li class="gnav__item"><a class="gnav__link" href="#recruit">RECRUIT</a></li>
      </ul>
      <!-- /.gnav -->
    </nav>
    <!-- /.header -->
  </header>
  <main>
    <section class="fv">
      <div class="fv__container">
        <h2 class="fv__ttl">Simple is Best</h2>
        <p class="fv__desc"> 余計な情報が無いって素敵ですよね。<br> 引き算の美学、良いものは簡素になるのかなと思います。<br> シンプルライフをお求めなら100万人以上の実績がある<br> 私たち「Simple LP Template」にお任せください。 </p> <a href="" class="fv__cv">無料で使ってみる</a>
        <!-- /.container -->
      </div>
      <!-- /.fv -->
    </section>
    <section class="about" id="about">
      <div class="about__container section__container">
        <h2 class="about__ttl section__ttl">ABOUT</h2>
        <p class="about__desc"> ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります ここに説明が入ります </p>
        <ul class="about__list">
          <li class="about__item">
            <div class="about__img"><img src="https://placehold.jp/120/cccccc/666666/1024x768.png?text=IMAGE" alt=""></div>
            <div class="about__contents">
              <h3 class="about__subttl">ポイント1</h3>
              <p class="about__subdesc">説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 </p>
            </div>
          </li>
          <li class="about__item">
            <div class="about__img is-2"><img src="https://placehold.jp/120/cccccc/666666/1024x768.png?text=IMAGE" alt=""></div>
            <div class="about__contents is-2">
              <h3 class="about__subttl">ポイント2</h3>
              <p class="about__subdesc">説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 </p>
            </div>
          </li>
          <li class="about__item">
            <div class="about__img"><img src="https://placehold.jp/120/cccccc/666666/1024x768.png?text=IMAGE" alt=""></div>
            <div class="about__contents">
              <h3 class="about__subttl">ポイント3</h3>
              <p class="about__subdesc">説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 </p>
            </div>
          </li>
        </ul>
        <!-- /.container -->
      </div>
      <!-- /.about -->
    </section>
    <section class="price" id="price">
      <div class="price__container section__container">
        <h2 class="price__ttl section__ttl">PRICE</h2>
        <p class="price__desc"> 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 説明 </p>
        <ul class="price__list">
          <li class="price__item">
            <h3 class="price__plan">FREE</h3>
            <table class="price__table">
              <tbody>
                <tr>
                  <th class="price__name">料金</th>
                  <td class="price__data">無料</td>
                </tr>
                <tr>
                  <th class="price__name">プラン内容</th>
                  <td class="price__data">機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 </td>
                </tr>
              </tbody>
            </table>
          </li>
          <li class="price__item">
            <h3 class="price__plan">PREMIUM</h3>
            <table class="price__table">
              <tbody>
                <tr>
                  <th class="price__name">料金</th>
                  <td class="price__data">980円/月</td>
                </tr>
                <tr>
                  <th class="price__name">プラン内容</th>
                  <td class="price__data">機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 機能の説明 </td>
                </tr>
              </tbody>
            </table>
          </li>
        </ul>
        <!-- /.container -->
      </div>
      <!-- /.price -->
    </section>
    <section class="recruit" id="recruit">
      <div class="recruit__container section__container">
        <h2 class="recruit__ttl section__ttl">RECRUIT</h2>
        <p class="recruit__desc"> 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 採用についてのかんたんな説明 </p> <a href="" class="recruit__more">採用情報の一覧</a> </div>
    </section>
    <!-- /.main -->
  </main>
  <footer class="footer"> <small class="footer__copy">© 2020 SIMPLE LP TEMPLATE Inc.

</small>
    <!-- /.footer -->
  </footer>
</body>
</html>

CSS

Sassの環境がない方も利用できるようにCSSでご紹介します。

/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

body {
  line-height: 1;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

nav ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: "";
  content: none;
}

a {
  margin: 0;
  padding: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

/* change colours to suit your needs */
ins {
  background-color: #ff9;
  color: #000;
  text-decoration: none;
}

/* change colours to suit your needs */
mark {
  background-color: #ff9;
  color: #000;
  font-style: italic;
  font-weight: bold;
}

del {
  text-decoration: line-through;
}

abbr[title], dfn[title] {
  border-bottom: 1px dotted;
  cursor: help;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* change border colour to suit your needs */
hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #cccccc;
  margin: 1em 0;
  padding: 0;
}

input, select {
  vertical-align: middle;
}

*, *:before, *:after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html, body {
  display: flex;
  flex-direction: column;
  color: #212121;
  font-family: "Noto Sans JP", sans-serif;
}

/* mixin
-----------------------------------------*/
/* contents
-----------------------------------------*/
.section__ttl {
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
  margin: 0 0 48px;
}
@media only screen and (max-width: 767px) {
  .section__ttl {
    font-size: 24px;
  }
}
.section__ttl:after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #212121;
  margin: 8px auto;
  border-radius: 16px;
}
.section__container {
  width: 1024px;
  margin: 0 auto;
  padding: 90px 0;
}
@media only screen and (max-width: 1024px) {
  .section__container {
    width: 90%;
    padding: 60px 0;
  }
}
@media only screen and (max-width: 767px) {
  .section__container {
    padding: 42px 0;
  }
}

.header {
  width: 100%;
  height: 70px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 auto;
  background: #4f9a94;
  color: #fff;
}
@media only screen and (max-width: 767px) {
  .header {
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 88px;
  }
}
.header__ttl {
  font-size: 28px;
  letter-spacing: 1px;
  margin: 0 0 0 32px;
}
@media only screen and (max-width: 767px) {
  .header__ttl {
    font-size: 24px;
    margin: 0 0 12px;
  }
}

.gnav {
  margin: 0 32px 0 auto;
}
@media only screen and (max-width: 767px) {
  .gnav {
    width: 100%;
    margin: 0 auto;
  }
}
.gnav__list {
  display: flex;
  align-items: center;
}
@media only screen and (max-width: 767px) {
  .gnav__list {
    justify-content: center;
  }
}
.gnav__item {
  margin: 0 16px 0 0;
  position: relative;
}
@media only screen and (max-width: 767px) {
  .gnav__item {
    margin: 0 16px;
  }
}
.gnav__item:last-of-type {
  margin: 0;
}
@media only screen and (max-width: 767px) {
  .gnav__item:last-of-type {
    margin: 0 16px;
  }
}
.gnav__link {
  display: block;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: all 0.5s ease 0s;
}
.gnav__link:after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  background: #fff;
  margin: 0 auto;
  border-radius: 10px;
  position: absolute;
  top: 20px;
  right: 0;
  left: 0;
  transition: all 0.5s ease 0s;
}
.gnav__link:hover {
  opacity: 0.6;
}
.gnav__link:hover:after {
  width: 30px;
}

.fv {
  background: #80cbc4;
}
.fv__container {
  width: 1024px;
  height: 550px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 0 auto;
}
@media only screen and (max-width: 1024px) {
  .fv__container {
    width: 90%;
  }
}
@media only screen and (max-width: 767px) {
  .fv__container {
    height: 400px;
  }
}
.fv__ttl {
  font-size: 60px;
  letter-spacing: 2px;
  margin: 0 0 32px;
  color: #356763;
}
@media only screen and (max-width: 1024px) {
  .fv__ttl {
    font-size: 48px;
  }
}
@media only screen and (max-width: 767px) {
  .fv__ttl {
    font-size: 32px;
  }
}
.fv__desc {
  line-height: 1.7;
  text-align: center;
  font-size: 20px;
  margin: 0 0 60px;
}
@media only screen and (max-width: 767px) {
  .fv__desc {
    font-size: 16px;
    margin: 0 0 32px;
  }
  .fv__desc br {
    display: none;
  }
}
.fv__cv {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #4f9a94;
  color: #fff;
  text-decoration: none;
  width: 300px;
  height: 65px;
  border-radius: 5px;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 0 5px #2c5753;
  transition: all 0.5s ease 0s;
  border: 2px solid #4f9a94;
}
.fv__cv:hover {
  box-shadow: none;
  background: #fff;
  color: #4f9a94;
}
@media only screen and (max-width: 1024px) {
  .fv__cv {
    font-size: 20px;
    width: 250px;
    height: 55px;
  }
}

.about {
  background: #b2fef7;
}
.about__desc {
  width: 600px;
  margin: 0 auto 80px;
  text-align: center;
  line-height: 1.7;
}
@media only screen and (max-width: 767px) {
  .about__desc {
    width: 100%;
    font-size: 14px;
    margin: 0 auto 48px;
  }
}
.about__item {
  width: 100%;
  list-style: none;
  display: flex;
  margin: 0 0 48px;
  flex-wrap: wrap;
}
.about__img {
  width: 30%;
}
.about__img img {
  width: 100%;
}
.about__img.is-2 {
  order: 1;
  margin: 0 0 0 auto;
}
@media only screen and (max-width: 1024px) {
  .about__img.is-2 {
    margin: 0 0 24px;
    order: 0;
  }
}
@media only screen and (max-width: 1024px) {
  .about__img {
    width: 100%;
    margin: 0 0 24px;
  }
}
.about__contents {
  width: 67%;
  margin: 0 0 0 auto;
}
.about__contents.is-2 {
  order: 0;
  margin: 0;
}
@media only screen and (max-width: 1024px) {
  .about__contents {
    width: 100%;
  }
}
.about__subttl {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 16px;
  display: flex;
  width: 150px;
  height: 46px;
  justify-content: center;
  align-items: center;
  background: #212121;
  color: #fff;
}
@media only screen and (max-width: 1024px) {
  .about__subttl {
    width: 100%;
    color: #212121;
    background: none;
    border-bottom: 1px solid #ccc;
  }
}
.about__subdesc {
  line-height: 1.7;
}
@media only screen and (max-width: 767px) {
  .about__subdesc {
    font-size: 14px;
  }
}

.price__desc {
  width: 600px;
  margin: 0 auto 80px;
  text-align: center;
  line-height: 1.7;
}
@media only screen and (max-width: 1024px) {
  .price__desc {
    margin: 0 auto 48px;
  }
}
@media only screen and (max-width: 767px) {
  .price__desc {
    width: 100%;
  }
}
.price__list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.price__item {
  width: 100%;
  list-style: none;
  width: 49%;
}
@media only screen and (max-width: 1024px) {
  .price__item {
    width: 100%;
    margin: 0 0 24px;
  }
}
.price__plan {
  font-size: 28px;
  margin: 0 0 20px;
  color: #4f9a94;
  padding: 6px 0 6px 10px;
  border-left: 6px solid #4f9a94;
}
.price__table {
  width: 100%;
  font-size: 18px;
  border-bottom: 1px solid #4f9a94;
}
@media only screen and (max-width: 767px) {
  .price__table {
    border: none;
  }
}
.price__name {
  width: 25%;
  padding: 12px;
  border: 1px solid #4f9a94;
  border-bottom: none;
  background: #c8e9e6;
}
@media only screen and (max-width: 767px) {
  .price__name {
    width: 100%;
    display: block;
    border: none;
    font-size: 14px;
  }
}
.price__data {
  width: 75%;
  padding: 12px;
  border: 1px solid #4f9a94;
  border-left: none;
  border-bottom: none;
  line-height: 1.7;
}
@media only screen and (max-width: 767px) {
  .price__data {
    width: 100%;
    display: block;
    border: none;
    font-size: 14px;
  }
}

.recruit {
  background: #f3f3f3;
}
.recruit__desc {
  width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}
@media only screen and (max-width: 1024px) {
  .recruit__desc {
    width: 100%;
  }
}
@media only screen and (max-width: 767px) {
  .recruit__desc {
    font-size: 14px;
  }
}
.recruit__more {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #4f9a94;
  color: #fff;
  text-decoration: none;
  width: 300px;
  height: 65px;
  border-radius: 5px;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 0 5px #2c5753;
  transition: all 0.5s ease 0s;
  border: 2px solid #4f9a94;
  margin: 60px auto;
}
.recruit__more:hover {
  box-shadow: none;
  background: #fff;
  color: #4f9a94;
}
@media only screen and (max-width: 1024px) {
  .recruit__more {
    font-size: 20px;
    width: 250px;
    height: 55px;
  }
}

.footer {
  background: #212121;
  padding: 24px 0;
  color: #fff;
  text-align: center;
  font-weight: bold;
}
@media only screen and (max-width: 767px) {
  .footer {
    font-size: 12px;
  }
}

補足

タブレットとスマホへの対応は、Media Queriesを利用してレスポンシブ化しました。
ブレイクポイントは1024pxおよび767pxとしています。

またどのブラウザ環境でも同じ状況に調整しやすいように、
リセットCSSとしてHTML5 DoctorのリセットCSSを利用しています。

フォントはGoogle FontsからNoto Sans JPを採用しました。

最後に

複雑なデザインは不要でちょっとしたLPが必要という場合には
お役に立てるかなと思います。

そのままご利用いただいても問題ありませんが、
適宜ご利用の用途にあわせて調整いただければ幸いです。

  1. SNIPPET
  2. PARTS
  3. LP向けのHTML5テンプレート 「SIMPLE LP TEMPLATE」