gpt-4-0613· OpenAI
Arena Human Preference 55K
write html and css code for a card container , i want in the top an image and in the…
- User
write html and css code for a card container , i want in the top an image and in the bottom a title with body text
- Assistant
Sure, here's a simple HTML and CSS code example for a card container with an image on top, and a title and body text at the bottom.
HTML:
<div class="card"> <img src="image.jpg" alt="Image" class="card-img"> <div class="card-content"> <h1 class="card-title">Title</h1> <p class="card-text">This is the body text for the card. It provides additional information about the card topic.</p> </div> </div>CSS:
.card { width: 300px; border: 1px solid #ccc; border-radius: 5px; overflow: hidden; margin: 10px; } .card-img { width: 100%; height: 200px; object-fit: cover; } .card-content { padding: 20px; } .card-title { margin: 0; font-size: 20px; line-height: 24px; } .card-text { font-size: 16px; line-height: 20px; color: #333; }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.