Best matchHeart Trail Animation
Generate changing values and display a new result each time.
Build a heart trail animation →Build a random photos with HTML, CSS, and JavaScript while practicing click events and DOM selection.
This project shows you how HTML, CSS, and JavaScript work together in a random photos. You’ll connect user interactions to visible changes on the page, then practice click events, DOM selection, and dynamic elements as you build the complete project from scratch.
Recommended knowledge: Basic HTML and CSS, Functions and Math.random, JavaScript variables and number operations, DOM selection and click events.
This project runs directly in the browser with HTML, CSS, and JavaScript.
index.html<!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>Random Photos</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="image-container">
<img src="https://picsum.photos/300?random=1" />
<img src="https://picsum.photos/300?random=2" />
<img src="https://picsum.photos/300?random=3" />
<img src="https://picsum.photos/300?random=4" />
<img src="https://picsum.photos/300?random=5" />
<img src="https://picsum.photos/300?random=6" />
</div>
<button class="btn">Load More</button>
<script src="index.js"></script>
</body>
</html>
Practice random values, javaScript calculations, and click events with these related projects.
Best matchGenerate changing values and display a new result each time.
Build a heart trail animation →
Turn JavaScript calculations into clear visual results.
Build a random color generator →
Request and render a randomly selected emoji.
Build a random emoji →
Generate changing values and display a new result each time.
Build a heart trail animation
Turn JavaScript calculations into clear visual results.

Request and render a randomly selected emoji.