How can I use an image in HTML code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I use an image in HTML code?

The problem is I don't know how to upload the image in this app to then use it in my code.

27th May 2022, 11:57 AM
Nastia
7 Answers
+ 6
Use img tag and src attribute to add image Hope it helps ⛄⛄💞💞💕💕
28th May 2022, 2:45 AM
Rakshit Pahel
Rakshit Pahel - avatar
+ 3
Images can be easily inserted at any section in an HTML page. To insert image in an HTML page, use the <img> tags. It is an empty tag, containing only attributes since the closing tag is not required. Just keep in mind that you should use the <img> tag inside <body>…</body> tag. The src attribute is used to add the image source i.e. URL of the image. The alt attribute is for adding alternate text, width for adding width, and height for adding the height of the image. Syntax of adding image is <img src="url" alt="alternatetext">
28th May 2022, 3:25 AM
😇🌟SWATI🌟😇
😇🌟SWATI🌟😇 - avatar
+ 2
Use Imgbb to upload img in html
28th May 2022, 2:00 PM
Ankit Rauniyar
Ankit Rauniyar - avatar
0
Search the forum here, you'll find the answer ;)
27th May 2022, 12:36 PM
Ausgrindtube
Ausgrindtube - avatar
27th May 2022, 10:07 PM
Chris Coder
Chris Coder - avatar
0
<image src='image.jpg' alt='220px' height='20px' width='20px'> </img>
29th May 2022, 6:09 AM
ARYAN RAJ