<?xml version="1.0" encoding="utf-8"?>

The src attribute

The src attribute

Can the Internet exist without cat pictures? That's how it was in its early dark textual days, but now it's challenging to imagine a webpage without images.

The tag <img> that allows us to insert — usually referred to as "embed" — images within a page has a required attribute src (an abbreviation for "source"). It specifies the path to the image displayed. Like links, you can either link local images stored on your website or external ones from the web. In most cases, it's better to use local images as you can't control when external images change URL or disappear.

Improve your UX & Product skills with interactive courses that actually work