Hamburger Icon
  • Labs icon Lab
  • Core Tech
Labs

Guided: Building with HTML and CSS - Part 1

In this lab you will build an interactive webpage for a pie shop using HTML, CSS, and JavaScript. The page will display a selection of pies in a modern grid layout and allow users to add pies to a shopping cart. By the end of this lab, you'll have hands-on experience building an interactive webpage from scratch. You'll learn practical skills in HTML, CSS, and JavaScript that form the foundation of web development.

Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 1h 21m
Published
Clock icon Aug 10, 2023

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Introduction

    Welcome to Code Labs! Today we're building an interactive webpage for a pie shop using HTML, CSS, and JavaScript. The page will display a selection of pies in a modern grid layout and allow users to add pies to a shopping cart.

    Steps:

    1. We'll start by building the basic HTML structure, adding links, images, and buttons.
    2. Next, we'll style our page using CSS, learning about CSS Grid, and responsive design techniques.
    3. Lastly, we'll use JavaScript to make our buttons interactive, adding pies to the shopping cart.

    By the end of this lab, you'll have hands-on experience building an interactive webpage from scratch. You'll learn practical skills in HTML, CSS, and JavaScript that form the foundation of web development.

    Where we are heading!

    Screenshot 2023-07-19 at 2.45.43 PM.png

    If you're ready, click on to the first task.

  2. Challenge

    Create the Pie Grid HTML Structure

    In this step we are going to build out the pie grid HTML structure. All of your code will be done inside /pies.html. Once you have completed the tasks above, refresh the Web Browser tab and use the button in the top-right corner to open it into a new tab. Remember to navigate to /pies.html to see the changes.

    Now we have to style it! If you're ready, click to move on.

  3. Challenge

    Style the Pie Grid

    In this step we are going to style the pie grid HTML structure. All of your code will be done inside styles.css and you will see your changes at /pies.html. Once you have completed the tasks above, refresh the Web Browser tab and use the button in the top-right corner to open it into a new tab. Remember to navigate to /pies.html to see the changes.

    Next we have to create the Add to Cart functionality. If you're ready, click to move on!

  4. Challenge

    Create the Add to Cart Functionality

    In this step we are going create the Add To Cart functionality that simualates adding an item to a cart. Your code will be in script.js and you will add the HTML button in pies.html. Nice! At this point your pies.html should be fully functional. You can see your pies in a grid and add them to the cart.

    Screenshot 2023-07-19 at 3.32.06 PM.png

Danny Sullivan is a former special education teacher and professional baseball player that moved into software development in 2014. He’s experienced with Ruby, Python and JavaScript ecosystems, but enjoys Ruby most for its user friendliness and rapid prototyping capabilities.

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.