100JSProjects
LearnProjectsExplore all projects
100JS_WORKSPACE/Build · Learn · Repeat
100JSProjects

Practical HTML, CSS, and JavaScript projects designed to help you turn concepts into real skills—one build at a time.

01Explore

./All projects./Learning guides./About./Contact./Privacy

02Resources

./GitHub repository./Support the project

© 2026 100 JS Projects. Built for developers.

TermsCookiesContact
JS//Projects/Photo Gallery

Photo Gallery

Build a photo gallery with HTML, CSS, and JavaScript while practicing API requests and async and await.

Intermediate30–45 minutesHTML5CSS3JavaScript
You’ll practice
API RequestsAsync and AwaitClick Events
View Source CodeLive Demo
demo.100jsprojects.com/photo-gallery
Final resultPhoto Gallery project previewTry Live Demo
01 — What you’ll build

Photo Gallery

Build a photo gallery using HTML, CSS, and JavaScript, then connect the interface to the logic that makes it work. You’ll learn how to organize images and create smooth, interactive navigation while getting hands-on practice with API requests, async and await, and click events.

02 — Included
  • ✓Live API-powered results
  • ✓Photo Gallery interface
  • ✓Responsive HTML and CSS layout
  • ✓Complete source code and live demo
03 — You’ll practice
  • >Fetch data from an API
  • >Work with asynchronous JavaScript
  • >Handle user clicks
  • >Select HTML elements from the DOM
  • >Update content on the page
  • >Read and update form values

Recommended knowledge: Basic HTML and CSS, JavaScript functions and arrays, Promises and the Fetch API, JavaScript arrays and array methods.

Complete project files

Build It from the Source Code

This project connects the interface to live API results.

  1. 1Create 3 files
  2. →
  3. 2Copy the code
  4. →
  5. 3Run index.html
Before you run it
  • Keep an internet connection available for live data.
Project structure
photo-gallery/
├──
├──
└──
Need help setting up the project?

Create project files, install Live Server, and run your first project.

Open beginner guide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Photo Gallery</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <div class="container">
      <h1>Photo Gallery</h1>
      <h2>Enter the number of photos</h2>
      <input
        type="number"
        id="input"
        class="input"
        value="2"
        min="1"
        max="10"
      />
      <small class="errorMessage" id="errorMessage">Error Message</small>
      <button class="btn" id="btn">Get Photos</button>
      <div class="gallery" id="gallery">
        <img src="https://images.unsplash.com/photo-1426604966848-d7adac402bff?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80" alt="image">
        <img src="https://images.unsplash.com/photo-1426604966848-d7adac402bff?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80" alt="image">
        <img src="https://images.unsplash.com/photo-1426604966848-d7adac402bff?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80" alt="image">
        <img src="https://images.unsplash.com/photo-1426604966848-d7adac402bff?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80" alt="image">
      </div>
    </div>
    <script src="index.js"></script>
  </body>
</html>

JS// Related Projects

Practice with Related Projects

Practice API requests, async/await, and input values with these related projects.

Weather App project preview★Best match
Related: API requestsIntermediate

Weather App

Request current weather data and display the response clearly.

Build a weather app →
Random Emoji project preview
Related: async/awaitIntermediate

Random Emoji

Request and render a randomly selected emoji.

Build a random emoji →
Image Search App project preview
Related: input valuesIntermediate

Image Search App

Turn a search term into a gallery of API results.

Build an image search app →
Weather App project preview
Related: API requests★Best match

Weather App

Request current weather data and display the response clearly.

Build a weather app
Random Emoji project preview
Related: async/await

Random Emoji

Request and render a randomly selected emoji.

Build a random emoji
Image Search App project preview
Related: input values

Image Search App

Turn a search term into a gallery of API results.

Build an image search app
JS{ }Explore All JavaScript ProjectsBrowse by difficulty or concept.Explore All Projects