0 votes
116 views
in HTML by (2.2k points)
edited
How do you add an image to a card in HTML?

1 Answer

0 votes
by (98.9k points)
edited

Use the <img> tag to add an image to a card. Specify the source (src) attribute with the image URL and optionally provide alternate text using the alt attribute. Here's an example:

 

<div class="card">
  <img src="image.jpg" alt="Card Image">
  <!-- Card content goes here -->
</div>

Related questions

0 votes
1 answer 68 views
0 votes
1 answer 73 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 72 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 101 views
asked Aug 19, 2022 in HTML by codelikepro (3.5k points)
0 votes
1 answer 83 views
0 votes
1 answer 92 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

535 users

...