Homework Assignments Based on Flexbox / CSS Grid Lab
1) Written HW: HTML & CSS Grid Questions
Instructions: Answer the following 10 questions related to HTML and CSS Grid. This exercise aims to reinforce your understanding of the layout mechanisms.
- What is the role of the
display: grid;property in CSS? - How do you define rows and columns in a CSS grid layout?
- What is the purpose of
grid-template-areas? - How can you make a grid item span multiple rows or columns?
- Explain the use of
grid-gap. - What is the difference between
grid-template-columnsandgrid-auto-columns? - What does the
justify-itemsproperty do in a grid layout? - How does
align-itemsaffect grid items? - What is the function of the
grid-areaproperty? - Describe a scenario where Flexbox is more appropriate to use than CSS Grid.
Instructions
- Go to CodePen and create a new pen.
- Answer the above questions in the html tab
- Create an
ol - Then create an
lifor each question - Inside each
liplace 2spantags - In 1
spantag write the question - In the other
spantag write the answer - Above the
oladd ah1tag and put your name in theh1 - Below the
h1place anh3and inside here type the name of your class and the Week this homework was assigned.
2) Practical HW: CSS Grid & Flexbox Layout
Platform: CodeSandbox
Goal: Create a 3x3 layout using CSS Grid, populate squares with X's and O's, and center them using Flexbox.
Instructions:
- Create a new project on CodeSandbox and name it "3x3 Grid Layout".
- Use CSS Grid to create a 3-row by 3-column layout.
- Place X's and O's in the squares.
- Use Flexbox to center the X's and O's within each square.
Tips:
- Utilize
justify-content: center;andalign-items: center;for Flexbox centering. - Make use of
grid-template-areasfor easier layout management.
3) Theoretical HW: Easy-Level JavaScript Challenge
Challenge: "The Alphabet Printer"
Goal: Write a JavaScript function that prints each letter of the alphabet on a new line.
Instructions:
- Write a function named
printAlphabet. - Use a
forloop to iterate through the values of 'a' to 'z'. - Print each letter on a new line.
- If the letter is a vowel, captalize it.
Key Takeaways:
- These homework assignments are designed to deepen your understanding of HTML, CSS, and JavaScript.
- They build upon the skills you've acquired during the Flexbox/CSS Grid class & lab.
- The theoretical hw builds upon your fizzbuzz solutions, but the way you get the answer will not be a mathematical operation. (the answer is closer than it appears)
- Proper submission ensures that your progress can be tracked and that you receive appropriate feedback.
Hungry For More
eCardly

Learning Objectives
- HTML & CSS
Prerequisites
- HTML & CSS
Deliverables
index.html and styles.css files that try to recreate the eCardly mockup as best as you can. The images you'll need are in the /ecardly/images directory inside this folder.
Tips
Body
-
The
<body>should have a background of the background.jpg provided for you in the images folder. The image should repeat only going left and right. The rest of the page should have a background of #d6d6d6.- Hint: define the background image repeating in only one direction AND the background color on the same line.
- The
<body>has a default font of Helvetica with font size of 12px. - Define a line height for the body of 1.7. This gives every line of text .35 padding above and below it.
Links (<a> tags)
- Links on the page should be red (#ff3300) and not be underlined.
