Contents  >

Web Agency Website Project (One)

Introduction

This three-page website for a fictitious web design agency showcases responsive multi-column layouts created with CSS flexbox.

You can display a finished version of this project by clicking the image below.

Web Design Project: Travel Agency 2n2l.com Brendan Munnelly

Learning Goals

At the end of this Tutorial you will be able to:

Contents

Introduction

Portfolio project folders and files

Working with your project files

The structure of your project web pages

Visual layout guides

Sub-dividing the web page with the <section> tag

Hero blocks and the <header> tag

Section blocks and class names

Adding background colours

Adding shadow effects to images

Adding a horizontal rule to the hero sections

Adding Font Awesome icons to the ‘Services’ page

Removing the visual layout guides

Adjusting vertical spacing

Uploading your project to GitHub

Portfolio project folders and files

Your first step is to download the files you need for this project.

  1. Download the following compressed file to your computer:  web-agency.zip
  2. If a sub-folder named portfolio does not already exist inside your websites folder, create it now. How to set up a website
  3. Uncompress the ZIP file into your websites/portfolio sub-folder as shown below. How to set up a website

This will create a sub-folder named web-agency inside your portfolio folder.

How to set up a website

The folders, sub-folders and files for this ‘Web Agency’ project will be as shown below.

How to set up a website

Working with your project files

Now you can begin to work with the files you have downloaded.

  1. In Visual Studio Code, open the following downloaded files. The first three are web pages; the fourth is a stylesheet file:
    • index.html, services.html and team.html: You will find these in the main web-agency folder.
    • style.css: You will find this in the assets/css/ sub-folder of the web-agency folder.
How to set up a website

You may wish to close any other files you may have open in VS Code.

The structure of your project web pages

Display the three project web pages in your web browser. They should look as shown below.

software-big-screen

Visual layout guides

To help you distinguish between the various parent and child elements, the following two styles are added at the bottom of the style.css stylesheet.

layout-parent-child-borders

You can remove these coloured borders at the end of the project.

Sub-dividing the web page with the <section> tag

As you can see, each of the three web pages is sub-divided into ‘blocks’ of content.

layout-blank-lines

You could use the <div> ... </div> tag pair for this purpose.

But a better, more modern HTML5 way is to use another tag pair with the same effect: <section> ... </section>.

Hero blocks and the <header> tag

Each web page begins with a hero section that is styled with the <header> ... </header> tag pair.

layout-blank-lines

This is similar to the <div> ... </div> tag pair, but is the preferred HTML5 way of identifying the first, introductory content block of a webpage.

Section blocks and class names

Under the ‘hero’ section (styled with the container-hero-block and hero-block classes), the basic structure of the three web pages is as follows.

wireframe wireframe wireframe

Adding background colours

In the style.css file, you can see two selectors with a single style rule have been created for background colours.

vscode-bg-colours

Let’s apply these background colours to your three web pages.

  1. In VS Code, display the index.html web page.
  2. Add the class of bg-pastel-pink to the parent containers that begin with the headings “Stand out from the crowd” and “Let’s make something great together“. vscode-bg-colours
  3. To each one of the three child item-col-3 columns that contain headings, text and images, add the bg-pastel-blue class. vscode-bg-colours
  4. Switch to the services.html web page.
  5. Add the class of bg-pastel-pink to the parent containers that begin with the headings “Your brand on every platform” and “Collaboration today. Success tomorrow.” vscode-bg-colours
  6. Switch to the team.html web page.
  7. Add the class of bg-pastel-pink to the parent containers that begin with the headings “Need a super hero?” and “We are here to help.” vscode-bg-colours
  8. Save the index.html, services.html and team.html files.

In your web browser, view the web pages on desktop/laptop and mobile size screens. They should look as shown below.

vscode-bg-colours

Adding shadow effects to images

In the style.css file, you can see a selector has been created to add a drop shadow effect to images.

vscode-bg-colours

Let’s apply this style to the three images in the home page of your sample website.

  1. In the index.html web page, add the class of image-shadow to the images within the three item-col-3 child column elements. vscode-bg-colours
  2. Save the index.html file.

In your web browser, view the index.html web page on desktop/laptop and mobile size screens. It should look as shown below.

vscode-bg-colours

Adding a horizontal rule to the hero sections

Next, let’s add a decorative horizontal line to the ‘hero’ section of the three web pages. The line will be between the h1 and h2 headings.

vscode-bg-colours
  1. In the index.html, services.html and team.html web pages, add the hr horizontal rule tag as shown below. vscode-bg-colours
  2. In the style.css file, add the following new CSS selector and style rules. vscode-bg-colours
  3. Next, add the following two media queries, selectors and style rules for desktop/laptop and mobile screens. vscode-bg-colours
  4. Save the index.html, services.html, team.html and style.css files.

In your web browser, view the web pages on desktop/laptop and mobile size screens. They should look as shown below.

vscode-bg-colours

Adding Font Awesome icons to the ‘Services’ page

Now you will add some Font Awesome icons to the services.html web page of the sample website. The child items with the item-col-4-2 class have already been created to hold the icons. You just need to add them. Follow these steps.

vscode-bg-colours
  1. In the head section of the services.html web page, just before the closing </head> tag, copy-and-paste the following comment line and code.
    <!-- Link to icons for Font Awesome 5 -->;
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous">  
    
    This adds the Font Awesome stylesheet to your web page.
  2. As you scroll down the services.html file, you can see the locations for adding the Font Awesome icons. Each contains the placeholder text ‘icon here’ and is within an item-col-4-2 child column. Below are just three of the eight locations. vscode-bg-colours
  3. One after the other, add the following eight icons.
    <i class="far fa-lightbulb"></i>
    
    <i class="far fa-comments"></i>
    
    <i class="fas fa-globe"></i>
    
    <i class="fab fa-instagram"></i>
    
    <i class="fas fa-at"></i>
    
    <i class="fas fa-video"></i>
    
    <i class="fas fa-user-friends"></i>
    
    <i class="fas fa-mobile-alt"></i>
    
  4. Save the services.html file, and, in your web browser, view the effect on your web page. It should look as shown below. vscode-bg-colours
  5. In your style.css file, add the following new properties and values for colour and spacing to the .container-flexbox .item-4-2 i CSS selector. vscode-bg-colours
  6. Save the style.html file.

In your web browser, view the services.html web page on desktop/laptop and mobile size screens. It should look as shown below.

vscode-bg-colours

Removing the visual layout guides

You can now delete the visual layout guides from your stylesheet.

  1. At the bottom of your style.css file, delete the styles for coloured borders around the parent containers and child columns. Project Privacy
  2. Save your style.css file.

Click here to view a finished version of the web design agency website.

Adjusting vertical spacing

After removing the coloured borders and blank ‘spacer’ paragraphs, scroll down the web page in your web browser to check the spacing between the various elements looks correct.

vscode-bg-colours

Let’s fix this.

  1. At the bottom of the style.css file, add the following two new selectors, each with a single style rule: Project Privacy
  2. Switch to the index.html web page.
  3. Add the new class of no-padding-bottom to the parent container-flexbox section.   And to the <h2> sub-heading, add the second new class of no-margin-bottom. Project Privacy
  4. Switch to the style.css stylesheet.   At (about) line 87 you can see a CSS selector with style rules that apply when a item-col-3 child column is inside a parent container styled with both the container-flexbox and work-samples classes. Project Privacy
  5. Switch to the index.html web page.
  6. Add the class of work-samples to the parent container-flexbox section of the three sample projects as shown below. Project Privacy
  7. When finished, save your index.html and style.css files.

In your web browser, view the index.html web page on desktop/laptop and mobile size screens. It should look as shown below.

vscode-bg-colours

Click here to view a finished version of the web agency website.

Uploading your project to GitHub

The final step is to upload your project to GitHub.

All the files for this project are in a sub-folder named web-agency of your websites/portfolio folder.

So you will need to upload this web-agency folder to your account on GitHub.

  1. Open a new tab in your web browser and go to Github.com. If you are not already signed in to your GitHub account, sign in now. github-signin
  2. On your GitHub home page, click the name of the repository (‘repo’) that holds your web pages. Its name will look as follows, where username is your chosen username on GitHub.   username.github.io github-signin
  3. On the next screen displayed, you can see a list of the contents your repository.   At the top of the list is a folder named portfolio. You created this folder when uploading your Smoothies project. github-upload-portfolio Click the portfolio folder to access it.
  4. Your GitHub screen should look like that shown below. You can see the portfolio folder’s name near the top of the screen. github-upload-portfolio
    • The portfolio folder already contains a smoothies sub-folder and other sub-folders from your previous projects.
    • The portfolio folder is also the location to where you want to upload your web-agency project sub-folder.

    GitHub image IMPORTANT Ensure your GitHub account is displaying the portfolio folder before continuing.
    Otherwise, you will upload your new project to an incorrect folder.
  5. With the portfolio folder displayed on your GitHub screen, click the Add file button and, from the dropdown list displayed, choose the option Upload files. Project Animation Google Fonts
  6. You are now ready to upload the entire web-agency folder and all its contents to the portfolio folder on your GitHub account.   In File/Windows Explorer on your computer, drag-and-drop the web-agency folder to the GitHub tab in your web browser. github-upload-drag-drop
  7. After uploading the web-agency folder, scroll down to the bottom of the GitHub screen, enter a short message in the Commit changes box, click the Commit changes button, and wait for the upload to complete. github-upload-progress
  8. After GitHub has finished processing your upload, it will re-display the main page of your repository. This will list your portfolio folder and files you previously uploaded to your main repository. github-uploaded-project Click the portfolio folder.
  9. On the next screen GitHub displays you should see the sub-folders from your previous projects and the web-agency folder you have just uploaded. github-uploaded-project Click the web-agency folder.
  10. On the next screen you should see the folder’s index.html file and its assets sub-folder. github-upload-portfolio-content
  11. Click the assets sub-folder to view its contents. You should see that it contains the two sub-folders: css and img.
    • Within the assets sub-folder, click the css sub-folder. Check that it contains the stylesheet file.
    • Within the assets sub-folder, click the img sub-folder. Check that it contains all the image files.

Your web page is now published on GitHub at a web address similar to the following, where username is the username you have chosen for your GitHub account:

https://username.github.io/portfolio/web-agency/index.html

or, simply:

https://username.github.io/portfolio/web-agency

It may take a few minutes for your uploaded files to appear on GitHub.



Return to Contents.