Best matchVideo Trailer Popup
Connect JavaScript controls to browser audio playback.
Build a video trailer popup →Build a background video with HTML, CSS, and JavaScript while practicing click events and DOM selection.
Build a background video using HTML, CSS, and JavaScript, then connect the interface to the logic that makes it work. You’ll learn how to connect user interactions to visible changes on the page while getting hands-on practice with click events, DOM selection, and CSS class toggling.
Recommended knowledge: Basic HTML and CSS, DOM events and the HTML audio element, JavaScript variables and number operations, DOM selection and click events.
This project combines JavaScript interactions with browser audio.
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>Sahand Ghavidel</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="preloader">
<img src="preloader.gif" alt="preloader">
</div>
<Header>
<video class="background-video" muted autoplay loop src="background-video.mp4"></video>
<h1>Sahand Ghavidel</h1>
<button class="btn btn-secondary">
<i class="fa fa-pause" aria-hidden="true"></i>
</button>
</Header>
<script src="index.js"></script>
</body>
</html>
Practice audio controls, javaScript calculations, and conditional logic with these related projects.
Best matchConnect JavaScript controls to browser audio playback.
Build a video trailer popup →
Turn JavaScript calculations into clear visual results.
Build an emoji rating →
Use conditions to control how the interface behaves.
Build a tabs section →
Connect JavaScript controls to browser audio playback.
Build a video trailer popup
Turn JavaScript calculations into clear visual results.
Build an emoji rating
Use conditions to control how the interface behaves.
Build a tabs section