0 votes
134 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 82 views
0 votes
1 answer 88 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 118 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 115 views
asked Aug 19, 2022 in HTML by codelikepro (3.5k points)
0 votes
1 answer 100 views
0 votes
1 answer 104 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

557 users

...