Output 3: Dynamic Photo Gallery

Dynamic Photo Gallery

Add image URLs to create a responsive gallery. Click on images to remove them.

No photos yet. Add one using the form above!

Features: The gallery is responsive and adapts to different screen sizes (1 column on mobile, 2 on tablet, 3 on desktop). Click any image to remove it from the gallery.

Source Code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dynamic Photo Gallery</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <form id="photoForm">
        <input type="text" id="photoUrl" placeholder="Enter photo URL" required>
        <button type="submit">Add Photo</button>
    </form>
    <div class="gallery" id="gallery"></div>
    <script src="script.js"></script>
</body>
</html>