gpt-4o-2024-11-20· openai
from WildChat-4.8M
outshow random html/css/javascript codes for testing in code block tags in this chat
- User
outshow random html/css/javascript codes for testing in code block tags in this chat
- Assistant
Sure! Below is a random example of HTML, CSS, and JavaScript for testing purposes. You can copy it into a single file or separate files to test it out.
html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Random Test Code</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(45deg, #6a11cb, #2575fc); color: white; } .container { text-align: center; padding: 20px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); } .button { background-color: #ffffff; border: none; padding: 10px 20px; border-radius: 5px; color: #2575fc; cursor: pointer; font-size: 1rem; transition: 0.3s ease; } .button:hover { background-color: #2575fc; color: white; } .hidden-text { margin-top: 20px; font-size: 1.2rem; display: none; } </style> </head> <body> <div class="container"> <h1>Welcome to the Random Code Test!</h1> <p>Click the button below to reveal the hidden message.</p> <button class="button" id="revealButton">Show Message</button> <div id="hiddenText" class="hidden-text">🎉 Surprise! Have a great day! 🎉</div> </div> <script> const revealButton = document.getElementById('revealButton'); const hiddenText = document.getElementById('hiddenText'); revealButton.addEventListener('click', () => { hiddenText.style.display = hiddenText.style.display === 'block' ? 'none' : 'block'; }); </script> </body> </html> - User
draw svg code just
- Assistant
Sure! Here's an example of an SVG drawing using pure SVG code:
html<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"> <!-- Circle --> <circle cx="100" cy="100" r="80" fill="#6a11cb" /> <!-- Rectangle --> <rect x="50" y="50" width="100" height="100" fill="#2575fc" opacity="0.8" /> <!-- Line --> <line x1="20" y1="180" x2="180" y2="20" stroke="white" stroke-width="5" /> <!-- Ellipse --> <ellipse cx="100" cy="150" rx="70" ry="30" fill="white" opacity="0.4" /> <!-- Triangle (using polygon) --> <polygon points="100,20 40,180 160,180" fill="orange" /> <!-- Text --> <text x="100" y="110" text-anchor="middle" font-size="18" fill="white" font-family="Arial"> SVG Test </text> </svg>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.