gpt-4o-2024-11-20· openai
from WildChat-4.8M
generate html>css>javascript OR HTML OR CSS OR JAVASCRIPT code block into chat
- User
generate html>css>javascript OR HTML OR CSS OR JAVASCRIPT code block into chat
- Assistant
Sure! Here is an example of HTML, CSS, and JavaScript code in a formatted block:
HTML Example:
html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Interactive Button</title> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>Hello, World!</h1> <button id="myButton">Click Me</button> <script src="script.js"></script> </body> </html>CSS Example (styles.css):
cssbody { font-family: Arial, sans-serif; text-align: center; background-color: #f0f8ff; margin: 0; padding: 2rem; } h1 { color: #333; } button { padding: 0.5rem 1rem; font-size: 1rem; color: #fff; background-color: #007bff; border: none; border-radius: 5px; cursor: pointer; } button:hover { background-color: #0056b3; }JavaScript Example (script.js):
javascriptdocument.getElementById("myButton").addEventListener("click", function() { alert("Button clicked!"); });This is a basic interactive setup where HTML provides the structure, CSS styles the page, and JavaScript provides interactivity. Let me know if you'd like a code snippet for something else!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.