1. Let's set up

  1. Start Sublime Text. It will open a new black window.
  2. Create a folder landing on your Desktop. Drag & drop this folder in the Sublime Text window.
  3. In Sublime Text left navigation:
    • Right click "New file"
    • Save it as index.html with Cmd + S or Ctrl + S
    • Do the same to create a style.css file
    • Then "New Folder" and create an images folder
  4. Finally double click on index.html to open it with Chrome

2. Add some HTML content

  • To save time, just right-click on the following images and save them in your images folder
  • Then start with this HTML code in index.html
<html>
  <head>
    <meta charset="utf-8">
    <title>My playground landing</title>
  </head>
  <body>
    <h1>My playground app</h1>
    <p>This is the important line everyone reads..</p>
    <p>
      <a href="#">Start now</a>
    </p>

    <img src="images/briefcase.png" alt="picture description" width="100">
    <h2>Fast</h2>
    <p>A fast app, <strong>very fast</strong> app</p>

    <img src="images/diamond.png" alt="picture description" width="100">
    <h2>Simple</h2>
    <p>A simple app, <strong>very simple</strong> app</p>

    <img src="images/heart.png" alt="picture description" width="100">
    <h2>Awesome</h2>
    <p>An awesome app, <strong>very awesome</strong> app</p>

    <img src="images/laptop.png" alt="picture description" width="100">
    <h2>Beautiful</h2>
    <p>A beautiful app, <strong>very beautiful</strong> app</p>

    <p>This is a playground landing ©Le Wagon</p>
  </body>
</html>

Extra - find nice personal icons

3. CSS for fonts & colors

Link your stylesheet style.css in the head section of your HTML

<head>
  <link href='style.css' rel='stylesheet'>
</head>

Then copy/paste the CSS code below in style.css and fix it cause it's ugly

/* style.css */
body{
  background: rgb(245,245,245);
  color: green;
  font-size: 25px;
  font-family: Helvetica;
}
h1{
  font-family: Courier;
  color: red;
  font-weight: lighter;
  font-size: 10px;
}
h2 {
  font-family: Courier;
  color: pink;
  font-weight: lighter;
  font-size: 8px;
}
a {
  color: yellow;
}
a:hover {
  text-decoration: none;
  color: purple;
}

4. Wrap with div

Wrap different sections in different div

<div>
  <h1>My playground app</h1>
  <p>This is the important line everyone reads..</p>
</div>

<div>
  <img src="images/briefcase.png" alt="picture description" width="100">
  <h2>Fast</h2>
  <p>A fast app, <strong>very fast</strong> app</p>
</div>

<div>
  <img src="images/diamond.png" alt="picture description" width="100">
  <h2>Simple</h2>
  <p>A simple app, <strong>very simple</strong> app</p>
</div>

<div>
  <img src="images/heart.png" alt="picture description" width="100">
  <h2>Awesome</h2>
  <p>An awesome app, <strong>very awesome</strong> app</p>
</div>

<div>
  <img src="images/laptop.png" alt="picture description" width="100">
  <h2>Beautiful</h2>
  <p>A beautiful app, <strong>very beautiful</strong> app</p>
</div>

<div>
  <p>This is a playground landing ©Le Wagon</p>
</div>

5. Name your tags

  • Name your banner and footer with id like <div id="banner"> and <div id="footer">
  • Name your features with class like <div class="card">
  • Then add this nice CSS code
#banner{
  text-align: center;
  background-image: url("https://unsplash.it/1300/600?random");
  background-size: cover;
  padding: 150px;
  color: white;
  text-shadow: 1px 1px 5px black;
}
#banner h1 {
  color: white;
  font-size: 50px;
}
#banner p {
  color: white;
  opacity: 0.8;
  font-size: 30px;
  font-weight: lighter;
}
#footer{
  padding: 30px;
  background: rgb(30, 30, 30);
  color: lightgrey;
}
.card{
  padding: 50px;
  font-weight: lighter;
}

Extra - find a cool background image

  • You can pick your background picture on Pexels

6. Fontawesome

In your head, it's in your head!

<head>
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">
</head>

And then in the footer

<ul>
  <li><a href="#"><i class="fab fa-youtube"></i></a></li>
  <li><a href="#"><i class="fab fa-facebook"></i></a></li>
  <li><a href="#"><i class="fab fa-twitter"></i></a></li>
  <li><a href="#"><i class="fab fa-github"></i></a></li>
</ul>

With a bit of CSS style

#footer a {
  color: lightgrey;
  font-size: 15px;
}
#footer a:hover {
  color: white;
}

7. Bootstrap setup

Link Bootstrap stylesheet in the head section of your HTML before your stylesheet link

<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  <link href='style.css' rel='stylesheet'>
</head>

Play with class="btn btn-primary" and class="list-inline", your first Bootstrap classes

8. Bootstrap grid

  • Inject your 4 cards div in the following responsive grid
<div class="container">
  <div class="row">
    <div class="col-xs-12 col-sm-6 col-md-3">
      <!-- div class="card" -->
    </div>
    <div class="col-xs-12 col-sm-6 col-md-3">
      <!-- div class="card" -->
    </div>
    <div class="col-xs-12 col-sm-6 col-md-3">
      <!-- div class="card" -->
    </div>
    <div class="col-xs-12 col-sm-6 col-md-3">
      <!-- div class="card" -->
    </div>
  </div>
</div>