Student starter code (30% baseline)
index.html- Main HTML pagescript.js- JavaScript logicstyles.css- Styling and layoutpackage.json- Dependenciessetup.sh- Setup scriptREADME.md- Instructions (below)💡 Download the ZIP, extract it, and follow the instructions below to get started!
Create interactive image slideshows with Bootstrap's carousel component.
By completing this activity, you will:
Time: 30-35 minutes | Difficulty: Medium
Open index.html in your browser to see:
Try this now:
index.html in your browser✅ Bootstrap Setup: All CSS and JS dependencies loaded ✅ Navbar: Fully functional navigation bar with Pet Care branding ✅ Page Headers: Title and subtitle styled with Bootstrap classes ✅ Carousel Structure: Complete carousel with 2 working slides ✅ Slide 1: Golden Retriever with caption ✅ Slide 2: Persian Cat with caption ✅ Carousel Controls: Previous/next arrows functional ✅ Carousel Indicators: Dots for slide 1 and 2 ✅ Auto-play: Carousel advances automatically every 5 seconds ✅ Instructions Section: Alert box explaining carousel functionality
Location: Inside <div class="carousel-inner"> (after Slide 2)
Success Criteria:
<div class="carousel-item"> (NOT active class)carousel-caption with pet name/breed and descriptiond-block w-100)Hints:
/95E1D3/ffffff?text=Your+Petactive classExpected Result: When you click "next" twice, you should see your new third slide appear.
Location: Inside <ol class="carousel-indicators"> (after indicator for slide 1)
Success Criteria:
<li data-target="#petCarousel" data-slide-to="2"></li>active class (only first indicator is active)#petCarousel)Hints:
Expected Result: You should see 3 indicator dots. Clicking the third dot jumps to your new slide.
Key Components:
<div class="carousel slide" data-ride="carousel"><ol class="carousel-indicators"> - Dot navigationactive class)Important Classes:
carousel slide - Main carousel wrappercarousel-item - Individual slide containercarousel-item active - First/currently visible slidecarousel-caption - Text overlay on slidesd-none d-md-block - Hide captions on small screensAuto-play Control:
data-ride="carousel" - Enables auto-playOnce you've completed the required tasks, try these:
data-interval="3000" to carousel to change slide speed (3 seconds)data-ride="carousel" and navigate manually onlycarousel-caption (background color, padding)carousel slide with carousel fade for different animationdata-ride="carousel" - Auto-play attributedata-interval="X" - Milliseconds between slidescarousel-control-prev/next - Navigation arrowsBefore submitting, verify:
Activity 12 | W1 Front-end Design & User Experience | 30-35 min