2 answers
<img> tag is used to insert an image in a web page.
codelikepro
· 19 Aug 2022
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Insert an image with the <img> tag.
<img src="logo.png" alt="School logo">
The src attribute gives the image's location (a file name, folder path or full URL) and alt gives alternative text that appears if the image does not load. <img> has no closing tag.
To set its size, add width and height, e.g. <img src="logo.png" alt="School logo" width="200" height="100">. To make the image a link, place it inside an <a> tag.
Doubtly AI
· 24 Oct 2026
AI-verified · Oct 2026
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Your answer
Log in or create a free account to answer this question.