Portfolio: Build Your Site (Lab 9)

This is Lab 9 in Developing Web Pages (BUS1880) and Web Fundamentals (CSCI1450). Do not start this lab until you have completed the Module 9 slideshow.

The objective of this lab is two-fold: 1) to build a complete portfolio website with a home page and a finished resume page, and 2) to practice website SEO fundamentals like page titles and meta descriptions.

There are two prerequisites for this lab: you’ll need to have completed Lab 1: Add HTML to Your Resume, and you’ll need a website template.

In this lab we are going to begin work on your Portfolio website. You have a head start with your resume.html file from Lab 1. In Lab 10 we’ll add a JavaScript game to your portfolio website. Most students use their Portfolio website as a starting point for their final project.

Jump to:

Content Guidelines

Content True for You

The content for this lab must be true for you. You may use the text from the Jane Programmer sample resume provided in Lab 1, but the text must be rewritten to be true for you.

Reminder: As always, you may use AI to help write your resume and paragraph text, but you may not use AI to write the HTML or CSS markup. Even though you may not use AI for coding, you may use AI to help polish your writing, like fixing typos or improving your wording. See Class Policies.

Website Images

It is important to only use images you have the rights to use. Do not search for images on Google or another search engine. Either use your own images or use images from a royalty-free website like Pixabay.com.

Personal Information on Your Portfolio

The website for this lab is about you, and you want to consider what information you want to keep private. Most students in CSCI1450 will publish this portfolio for their final project. (Students in BUS1880 have the option to publish it.)

Here are some thoughts about personal information:

  • Don’t include your phone number. Don’t use a fake phone number, because this will annoy a hiring manager looking at your portfolio. Delete the phone number from the footer.
  • If you can safely use your last name, you should use it to build your online presence. Sharing your last name will help your networking efforts.
  • If you can’t safely use your last name, don’t use a fake last name. Give your website a name like “Susan’s Portfolio” or “Susan’s Designs.” Another option is to use your middle name instead of your last name.

A. Set Up the Portfolio Project

Step 1. Files and Folders

You already have a “portfolio” folder in your websites folder with the resume.html file in it. Copy the index.html and style.css files from the templates folder, and place them into the portfolio folder. Your folders and files should look like the screenshot below.

File structure for the portfolio website.

Now add an empty images folder to the portfolio folder. (You will find your own images for this lab.)

Step 2. Add <header> Text

Open index.html, and add a website name in the <header>. You already have the <header> code in your template, so all you need to do on this step is change the text where it says “Website Template” to your website name, e.g. John Smith. This website will be your portfolio, so the most obvious name to choose is your first and last name. However, if you don’t want to use your last name, you can also choose a website name like “Joseph’s Portfolio” or “Emily’s Designs.” Students in CSCI1450 will add a logo later in the semester (Lab 14).

Optional: want to get ahead? If you’re in CSCI1450, you can create your own logo now instead of waiting until Lab 14, using our Simple Logo lesson, and use it in your header instead of text. Students in BUS1880 won’t need a logo for this course, but you’re welcome to make one too if you’d like the practice.

Step 3. Add Navigation Links

You already have a navigation in your website template. All you need to do is change the href to the new file names and the text to the human-readable name. For this website, create the following links:

  • Home – index.html
  • Resume – resume.html
  • Game – game.html (We’ll create this JavaScript game in the next lab.)

At the end of this step, your nav should look like this:

Screenshot of the navigation area for the Portfolio Lab, Labs 9 and 10.

View the result in a browser. Your template already has some CSS to style the header and navigation.

Step 4. Update the Copyright

Check the copyright text in your footer. It should already say your own name, since you copied it from your template, but this is a new website, so take a moment to make sure it’s still correct.

B. Design the Home Page

Now we are going to work on the home page for your portfolio. When it is finished, it will look something like this, but with your images and design. Jane Programmer is a mythical student I used to create screenshots for the lab.

Finished example of a home page for Lab 9, a portfolio website.

Step 1. Add a Full-Width Hero Image

Go to Pixabay.com and find a background image. An image that is abstract may work best. Whatever colors you choose for the hero will drive your other color choices, so choose the image with colors you like to work with.

Here are a few hints:

  • Choose a background image that doesn’t have too much detail to it, so your text can pop on it. For example, if your favorite color is lavender, try searching Pixabay.com for “lavender background”.
  • Be sure to place the background image into the “images” folder.
  • I recommend renaming the background-image to be something that is easier to type.
  • Remember to put the <div> for the hero in between the <nav> and <main> sections so it can be full width.
  • White text with a black shadow works best for hero images. To design your text-shadow, consider using this Text-Shadow Generator.

Note: The hero image in the Jane Programmer website is only a suggestion. You may make any type of hero image you like, as long as it has text on it and uses a layout different from Groove Guitars.

Feeling stuck on the code? Here is the code I used for the Jane Programmer hero. If you use this code as a starting point, be sure to change all of the values to fit your hero, especially the font-family.

HTML code for a hero image
CSS for a hero image with text on top of it.

Note: I used a class instead of an ID for my home-hero image. While an ID works as well, the coding convention is generally to use a class instead of an ID when you are coding in CSS.

Using Dancing Script, or a different font, for your hero text? Typing a font name into font-family won’t work by itself, even for Dancing Script. You first need to import that font from Google Fonts before it will actually display, just like you did for your other fonts. (Need a refresher? See How to Use Google Fonts.)

Step 2. Add Home Page Text

If you don’t have a cover letter or professional description of yourself, you may use the Jane Programmer text below as a starting point. All text must be rewritten to be true for you. Here is some text for a starting point, if you need it:

My name is Jane Programmer and I study Web Design and Web Programming at Saint Paul College in St. Paul, Minnesota. My planned graduation date is May 2027 with the Web Design and Web Development Certificates. I made this website as a portfolio of my skills developing websites.

I have taken the following classes at Saint Paul College:
Web Fundamentals, where I learned HTML and CSS
Computer Science and Information Systems
Introduction to Computing and Programming Concepts

Next semester I will be taking Client Side Programming and Web Design. I am also planning on taking the Adobe classes in order to obtain my certification in Photoshop and Illustrator.

My hobbies include video gaming, reading science fiction, practicing guitar, and playing magic cards.

The text must be at least 150 words and must be formatted with HTML.

Step 3. Add a Photo of Yourself (or Equivalent)

Add at least one image and some formatted text to the index.html file. If you can safely include an image of yourself, that will make for a better portfolio, because a hiring manager will find it easier to relate to you.

If you don’t want to include an image of yourself, then you can use an image that represents you.

  • Choose an image and place it in your images folder.
  • Code the image as an embedded image, not a background-image. Be sure to change the attributes to match your image.
  • Float the image to the right or left of your text with the float property. Floating the right can be a bit easier than floating to the left.
  • Remember my trick for floating, to give the image a max-width that is 50% or less. That may save some work on mobile devices.

Feeling stuck? See the text below for a refresher.

Code for an image showing a class of home-photo
CSS to make an image that floats to the right at 50% width with some padding.

Note on floats: Keep in mind that if you use “img” as the selector, you will be floating every image you put on your website, and that may be a problem later. So a better way to do the float is to add a class to your home page image, like class="home-photo", and then select .home-photo in the CSS.

What should I use for the image height and width? Use the actual image height and width. You can find the image height and width from Mac Finder or Windows File Explorer. Your image will likely be too large, but you can correct that by adding a max-width to the image in order to have it fit your home page. The max-width property works great as a percentage, and using a percentage (like max-width: 40%) is a nice fix for mobile.

Resizing Images: The images that have been provided to you for previous labs were already resized to fit. Images taken with your phone will be very large for web use. If you have the skills to resize the images, e.g. with Photoshop, Preview, or Paint 3D, it would be a good idea to resize them for web use. (Students in CSCI1450 will learn how to resize images in Lab 12.)

Optional: want to speed up your page now? If you’d like to resize and compress your images before Lab 12, check out the Working with Images on the Web lesson. If the instructions feel like a lot right now, don’t worry about it, we’ll come back to this in Lab 12 and again in the final project.

What if my image is covering the footer? Add a max-width to the image in the CSS. Assuming you added the class suggested above (.home-photo), you can select the image in the CSS. If your image is larger than your text and bleeds into your footer, there are two solutions:

  1. Add more text. Tell the world a little bit more about yourself.
  2. Clear the float in your footer selector. A float only changes how the elements around it wrap, it doesn’t automatically know when to stop. Adding clear: both tells the footer to ignore the float completely and drop onto its own line below everything else, instead of trying to squeeze in beside your image. The code looks like this:
footer{
   clear: both;
}

Compare your browser view to the screenshot of the home page above. Make sure it looks similar, but with your image, colors, and font choices.

C. Update and Design Your Resume Page

In this section, you will build on the resume page you made in Lab 1. At the end of this section, your resume.html page will look something like the screenshot below, but with your own content and design.

Example of the completed Resume Page in Lab 9.

Step 1. Complete the HTML Framework

The first week of class, you made a resume.html file with some simple HTML markup. It was an incomplete web page, because it didn’t include all of the required HTML elements for a web page. In other words, we didn’t add the <!DOCTYPE html> and all of the metadata and semantic elements to this page.

Copy the missing elements into the resume.html file from index.html:

  • Start at the top of index.html and select all of the code through the opening <main> tag. Paste that above your current resume content.
  • Then start at the closing </main> tag in index.html and select all of the code through the end of the page. Paste that below your current resume content.
  • Check to make sure you included the opening and closing <main> tags.

Do not put the hero image on the resume page. For the most part, hero images should only be on the home page for a good user experience. When a hiring manager clicks on the resume page, they want to see your resume, not a hero image.

Step 2. Check HTML

Check your HTML from Lab 1 and make any repairs needed, since you’ve learned a lot since then.

In particular, take the time to indent your code, and make sure that all of your <ul> and <li> tags are closed.

Also check to make sure your resume content is inside the <main> section.

The resume must be your own content. If you don’t have a resume, use the Jane Programmer resume as a starting point to write your own resume.

As a college student, you will need a resume to apply for professional jobs. If you would like help with your resume, either contact Career Services at Saint Paul College, or make an appointment with me at WebDevStudents.com. I would love to help you put together your first professional resume. Remember that you may use AI to improve the text of your resume, but not for the code.

D. Add Metadata for Website SEO

Update the title and description for all of the pages of your Portfolio website. Each page should be unique.

Here is an example of the code for the title and description, using the resume page. You must rewrite the description to be of yourself and your portfolio.

<title>Jane Programmer Portfolio :: Resume</title>
<meta name="description" content="This is the resume page of Jane Programmer, a mythical student of web design created by Susan Metoxen.">

You’ll also need to write a title and description for your home page (index.html). Since there’s no starting point given for the home page version, that one will take a bit more original writing on your part.

Quality metadata is very important for website SEO.

E. Design the Website

Now this is where you make the design your own, choosing colors and fonts that fit YOUR portfolio. At a minimum, you must do some design work on the navigation, footer, headings, and your photo.

Step 1. Set the Max-Width

Choose a max-width for your main section. You don’t have to match mine exactly. A narrower main section is generally easier to style, and it also makes text more comfortable to read, since very long lines are harder on the eyes. For the Jane Programmer sample website, I chose 800px because it keeps paragraphs readable while still leaving enough room for images and headings. A reasonable range to choose from is about 700px to 1000px.

Step 2. Choose Google Fonts

Go to Google Fonts and choose fonts for this website. Choose a decorative font for headings and a simpler font for paragraph text. If you need a refresher, read about Google Fonts here.

Step 3. Choose Colors

Choose colors for this website. A good guide to choosing colors may be the background image you are using on the home page. Check to make sure that text is clearly visible throughout the website. You may use any fonts and colors except the colors in the Jane Programmer sample pages. Apply your color choices to the headings, the header or nav, and the footer. Need help picking colors? Try the Simple Hexadecimal Color Picker or CSS Color Name Picker. One idea: use the Color Picker: Choose from Image tool to pick a color directly from your hero background image.

Step 4. Optional: Add a <body> Border

A nice trick for decorating a web page is to put a top and bottom border on the body. This design trick adds a bit of color to the page. I chose a dark blue color from the hero image for the border.

Screenshot of what it looks like when you add a border-top to the website body.

Need help picking border styles? Try the Border Generator.

Here is the code I used, see the border-top and border-bottom code:

Screenshot of code to make a border-top and border-bottom on a web page by selecting body.

Step 5. More CSS Properties to Try

Here are some other CSS properties you may want to use to finish your design:

Checklist for Grading

Here is a checklist of what I will be looking for when grading the website:

Content:

Design:


Now you have a complete portfolio website! Move on to Lab 10 to build and customize your very own playable Flappy Bird game in JavaScript.

Thumbnail for Lab 9, the portfolio lab.

Need Help?

Using AI for coding is not allowed in this course, so if you get stuck simply Make an Appointment for office hours. In addition, if you run into a bug as you are working, you may email your websites folder to me at susan.metoxen@saintpaul.edu.

Browse All Lessons

CSS Design Tools