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
html<div class="card"> <img src="image.jpg" alt="image" /> <div class="card-body"> <h2>Title</h2> <p>Body text</p> </div> </div>css.card { display: block; width: 100%; margin: 0 auto; padding: 1rem; border: 1px solid #ccc; border-radius: 5px; } .card-body { padding: 1rem 0; } img { width: 100%; height: auto; } h2 { font-size: 1.5rem; margin: 0 0 1rem 0; } p { font-size: 1rem; margin: 0 0 1rem 0; }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.