Gather Workshops Logo

Layout Builder

Design a theme for your site

Page Layout Design

Image of website with header, nav and content area

This is what our page layout will look like

Using a Layout

Index page will be used as a template for images page and videos page

We can copy our layout to make more pages

CloudCannon lets you edit and preview your website

Cloud Cannon lets us edit our code and preview our site

Create a New Project

In CloudCannon, click "Create Site" and make a project

Site Template

We will create images, index and style in our project folder

Template Files


images

All your images go in this folder.

index.html

HTML code for your home page.

style.css

CSS code for your whole website.

Create Index Page

Create index.html in your dashboard

Index Page Starter Code

<!DOCTYPE html>
<html>

    <!-- head only used by the browser -->
    <head>
        <title>My Page Title</title>
        <link rel="stylesheet" href="style.css">
    </head>

    <!-- body contains the visible page content -->
    <body>
        <!-- My HTML Code Goes Here-->
    </body>

</html>

Copy this HTML code into your index.html

HTML Head

<head>
    <title>My Page Title</title>
    <link rel="stylesheet" href="style.css">
</head>

The head contains a browser tab title and a CSS file link

HTML Body

<body>
    <!-- My HTML Code Goes Here-->
</body>

All of our page content HTML goes between the body tags

Create Stylesheet

Create style.css in your dashboard

Choose a Background Type

Tiled

A smaller image which repeats
to fill the whole page.

Full-Screen

A large image which stretches
to fill the whole page.

Right-click an image and "Save Image As..."

Upload Background Image

Upload the background image to CloudCannon

Move Background to Images Folder

Use the image options to "Move to new folder"

Tiled Background

If you want a repeating background, use this code.

Add to your style.css:

html {
    background-image: url('images/ravens-tile.gif');
}

Make sure to choose an image which tiles nicely!

Full-Screen Background

If you'd like a full-screen background, use this code.

Add to your style.css:

html {
    background-image: url('images/tree-cover.jpg');
    background-size: cover;
    background-attachment: fixed;
}

Make sure to choose a nice large image!

Background Ideas

Take a few minutes to make your background
look how you want it.

Header

The header goes at the top of the page. It will be a plain box containing a heading.

Adding a header to your page

Header Content

Add to index.html, between the body tags:

<header class="page-header">
    <h1>My Awesome Website</h1>
</header>

You should now see a heading on your page.
The header box will be invisible until you add CSS.

Header Design

Add to your style.css:

.page-header {
    background-color: #222222;
    color: #FFFFFF;
    padding: 20px;
}

This code will give your header a dark grey background,
white text and 20px of spacing around the inside edge.

Header Ideas

Take a few minutes to make your header
look how you want it.

Page Content Area

The content area goes under the header. It will be a plain box containing some basic text content.

Adding the main content to your page

Content Section

Add to your index.html, on a new line after your closing </header> tag:

<section class="page-content">

    <h2>Hello there, amazing person!</h2>

    <p>
    This is a site all about my favourite stuff, 
    thanks so much for visiting.
    </p>

</section>

We will use this page-content section on every page,
but we will change the content inside it for each page.

Content Section Design

Add to your style.css:

.page-content {
    background-color: #222222;
    padding: 30px;
    width: 700px;
    margin: 0 auto;
    margin-top: 30px;

    color: #FFFFFF;
    font-size: 14px;
    line-height: 130%;
}

This code will give you a starting point to begin
designing your content section.

Summary

Using HTML and CSS, you've now made
a whole web page!

Next we will add some more pages to our site.

Loading...