Practice and reinforce the concepts from Lesson 4
Total Activity Time: 20 minutes (15 minutes coding + 5 minutes testing)
What you'll do: Open the project and familiarize yourself with the interface
⚠️ Important: File Management DO NOT DELETE any existing files in the template:
- Package files
- Configuration files
- Any other files you didn't create
ONLY EDIT the HTML and CSS files as instructed.
In this activity, you will create a butterfly life cycle webpage through three progressive challenges that build upon each other, practicing HTML structure and CSS styling techniques.
Time: 5 minutes
Goal: Create a semantic HTML structure for the butterfly life cycle page
Steps to complete:
index.html
file in your project<h1>
tag with text "The Butterfly Life Cycle"<h2>
) for each stage:
tip Heading Hierarchy Remember to use semantic HTML:
<h1>
for the main page title (only one per page)<h2>
for the four life cycle stagesTime: 8 minutes
Goal: Enhance your page with relevant images for each life cycle stage
Steps to complete:
<img>
tag under each stage's descriptionsrc
attribute to the copied image URLalt
text for each imageExample code structure:
<h2>Egg</h2>
<p>Description of the egg stage...</p>
<img src="image-url-here" alt="Butterfly egg on a leaf">
tip Finding Good Images
Time: 2 minutes
Goal: Style your page using an external CSS file
Steps to complete:
styles.css
in your project<head>
section:
<link rel="stylesheet" href="styles.css">
img {
width: 300px;
height: 200px;
}
body {
text-align: center;
}
tip CSS Selectors
img
selector targets ALL images on the pagebody
selector affects the entire page content<head>
sectionTime: 2 minutes
Final checklist:
⚠️ Common Issues to Check
- Images not loading? Check that your image URLs are correct
- CSS not applying? Verify your link tag path matches your CSS filename
- Layout looks wrong? Make sure you closed all your HTML tags properly
Before submitting, ensure your project includes:
HTML Requirements:
<h1>
tag with "The Butterfly Life Cycle"<h2>
tags for each life cycle stagealt
attributesCSS Requirements:
styles.css
<head>
sectionQuality Standards:
ℹ️ Info Ready to Submit? When you have completed your "CSS Styling Challenge" project and verified all requirements:
Before submitting:
Problem: Images aren't showing
Problem: CSS isn't applying
<link>
tag is in the <head>
sectionProblem: Layout doesn't match the example
<h1>
, <h2>
)Need help? Review the lesson materials or ask your instructor!