gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
Create a simple button
- User
Create a simple button
- Assistant
To create a simple button, you can use HTML for basic structure and CSS for styling. Here's an example of a basic button:
HTML
html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="styles.css"> <title>Simple Button</title> </head> <body> <button class="simple-button">Click Me</button> </body> </html>CSS (styles.css)
css.simple-button { background-color: #4CAF50; /* Green background */ border: none; /* Remove border */ color: white; /* White text */ padding: 15px 32px; /* Some padding */ text-align: center; /* Center the text */ text-decoration: none; /* Remove underline */ display: inline-block; /* Get inline */ font-size: 16px; /* Set a font size */ margin: 4px 2px; /* Some margin */ cursor: pointer; /* Pointer/hand icon */ border-radius: 12px; /* Rounded corners */ transition: background-color 0.3s; /* Animation for hover effect */ } .simple-button:hover { background-color: #45a049; /* Darker green on hover */ }Explanation
- HTML: A simple button element is created with the class
simple-button. - CSS:
- The button is styled with a green background and white text.
- The CSS provides some padding and margin to give it breathing space.
- The button's corners are rounded using
border-radius. - A hover effect is added to change the background color to a slightly darker green when hovering over it with a mouse.
- HTML: A simple button element is created with the class
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.