<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Interactive Webpage</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; box-sizing: border-box; background-color: #e9ecef; } header { background-color: #007bff; color: white; padding: 20px; text-align: center; } main { max-width: 800px; margin: 20px auto; padding: 20px; background-color: white; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } h1, h2 { color: #333; } .content { margin-top: 20px; } button { padding: 10px 20px; font-size: 1em; color: white; background-color: #007bff; border: none; border-radius: 5px; cursor: pointer; } button:hover { background-color: #0056b3; } .result { margin-top: 20px; padding: 10px; background-color: #f8f9fa; border: 1px solid #ddd; border-radius: 5px; } </style> </head> <body> <header> <h1>Interactive Webpage</h1> </header> <main> <h2>Click the Button</h2> <div class="content"> <button onclick="displayMessage()">Click Me</button> <div id="result" class="result" style="display: none;">Hello, you clicked the button!</div> </div> </main> <script> function displayMessage() { var resultDiv = document.getElementById('result'); resultDiv.style.display = 'block'; } </script> </body> </html>