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.
At the end of this Tutorial you will be able to:
Portfolio project folders and files
Working with your project files
The structure of your project web pages
Sub-dividing the web page with the <section> tag
Hero blocks and the <header> tag
Section blocks and class names
Adding shadow effects to images
Adding a horizontal rule to the hero sections
Adding Font Awesome icons to the ‘Services’ page
Your first step is to download the files you need for this project.
This will create a sub-folder named web-agency inside your portfolio folder.
The folders, sub-folders and files for this ‘Web Agency’ project will be as shown below.
Now you can begin to work with the files you have downloaded.
You may wish to close any other files you may have open in VS Code.
Display the three project web pages in your web browser. They should look as shown below.
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.
You can remove these coloured borders at the end of the project.
As you can see, each of the three web pages is sub-divided into ‘blocks’ of content.
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>.
Each web page begins with a hero section that is styled with the <header> ... </header> tag pair.
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.
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.
In the style.css file, you can see two selectors with a single style rule have been created for background colours.
Let’s apply these background colours to your three web pages.
In your web browser, view the web pages on desktop/laptop and mobile size screens. They should look as shown below.
In the style.css file, you can see a selector has been created to add a drop shadow effect to images.
Let’s apply this style to the three images in the home page of your sample website.
In your web browser, view the index.html web page on desktop/laptop and mobile size screens. It should look as shown below.
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.
In your web browser, view the web pages on desktop/laptop and mobile size screens. They should look as shown below.
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.
<!-- 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.
<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>
In your web browser, view the services.html web page on desktop/laptop and mobile size screens. It should look as shown below.
You can now delete the visual layout guides from your stylesheet.
Click here to view a finished version of the web design agency website.
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.
Let’s fix this.
In your web browser, view the index.html web page on desktop/laptop and mobile size screens. It should look as shown below.
Click here to view a finished version of the web agency website.
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.
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.