<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Image Compressor</title>
    <link rel="stylesheet" href="image-compressor.css">
</head>
<body>
    <div class="container">
        <h1>Image Compressor</h1>

        <input type="file" id="imageInput" accept="image/*"><br><br>

        <label for="qualityInput"><strong>Select Compression Quality:</strong></label><br>
        <input type="range" id="qualityInput" min="0.1" max="1" step="0.1" value="0.7">
        <span id="qualityValue">0.7</span><br><br>

        <button onclick="compressImage()">Compress Image</button><br><br>

        <h3>Compressed Image:</h3>
        <img id="outputImage" alt="Compressed Image" style="max-width: 100%; display: none;">

        <br><br>
        <a id="downloadLink" style="display: none;" download="compressed-image.jpg">Download Compressed Image</a>
    </div>

    <script src="image-compressor.js"></script>
</body>
</html>
