give a web page example
- User
give a web page example
Assistant
Here’s a simple example of a basic HTML web page with some CSS styling and minimal JavaScript functionality:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Simple Web Page</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 0; background-color: #f4f4f4; color: #333; } header { background: #35424a; color: white; padding: 1rem 0; text-align: center; } nav { background: #333; padding: 0.5rem; } nav ul { list-style: none; padding: 0; display: flex; justify-content: center; } nav ul li { margin: 0 1rem; } nav ul li a { color: white; text-decoration: none; } .container { width: 80%; margin: auto; padding: 2rem 0; } footer { background: #35424a; color: white; text-align: center; padding: 1rem 0; position: fixed; bottom: 0; width: 100%; } button { background: #35424a; color: white; border: none; padding: 0.5rem 1rem; cursor: pointer; } button:hover { background: #333; } </style> </head> <body> <header> <h1>Welcome to My Website</h1> </header> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Services</a></li> <li><a href="#">Contact</a></li> </ul> </nav> <div class="container"> <h2>About This Page</h2> <p>This is a simple example of a web page created with HTML and CSS.</p> <p>You can add more content here, such as images, forms, or other interactive elements.</p> <button id="myButton">Click Me!</button> <p id="demo"></p> </div> <footer> <p>© 2023 My Simple Web Page. All rights reserved.</p> </footer> <script> document.getElementById("myButton").addEventListener("click", function() { document.getElementById("demo").innerHTML = "Button clicked! Hello, world!"; }); </script> </body> </html>Features of this example:
- Basic Structure: Includes standard HTML5 document structure
- Styling: Internal CSS for basic layout and appearance
- Navigation: Simple navigation menu
- Interactive Element: A button with JavaScript click handler
- Responsive Design: Basic responsive considerations
- Semantic Elements: Uses header, nav, and footer elements
You can copy this code into a file with a
.htmlextension and open it in any web browser to see it in action.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.