From the course: HTML for Programmers
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Media content
- [Instructor] We can embed images, audio files, and videos in our HTML pages using the image, audio, and video tags. Let's start by embedding an image on our webpage. We can either embed a local image that's located in our project folder or use an absolute path to an image hosted elsewhere on the web. For example, if we have a project with an image that's located in an assets folder one level up from our current folder, our usage of the image would look like this. We first start by declaring the image tag. Next, we set the source attribute on the image. The value of this attribute is the path to the photo. We also need to add an alt tag to our image. This is a text alternative that will be read aloud for visually impaired or blind users that rely on screen readers. If we check out our browser, we can see our beach image rendering nicely. Let's add a second image from the internet. For this, we'll use the beach image from…