SwitchUp SwitchUp Ranked Best Coding Bootcamps 2025

How to put image onto html?

Altcademy Team wrote on 7 February 2018

You can use the <img> tag like this:
<img src="duck.jpg" alt="duck">

src stands for source and it should be the link to your image, hosted locally or somewhere else. alt is for screen readers and a failsafe for when the image doesn't load, users can at least know what the image is about. Also, adding alt tag is important for search engines to understand your image, a must do if you care about Search Engine Optimisation SEO.

Trusted by

Students and instructors from world-class organizations

Join the upcoming Cohort #111

Enroll for March 2nd, 2026