How can I use an image in HTML code? | Sololearn: Learn to code for FREE!


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.

5/27/2022 11:57:00 AM


7 Answers

New Answer


Use img tag and src attribute to add image Hope it helps β›„β›„πŸ’žπŸ’žπŸ’•πŸ’•


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">


Use Imgbb to upload img in html


Search the forum here, you'll find the answer ;)




<image src='image.jpg' alt='220px' height='20px' width='20px'> </img>