This course will be retired on July 31, 2024. We recommend "Introduction to HTML and CSS" for up-to-date content.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
The image tag allows you to add photos and images to your web pages.
PlaceIMG
Unfortunately PlaceIMG is shutting down their services in June 2023. Luckily there are a couple of alternatives you can use for your place holder images:
You can copy and paste the code snippet below to follow along with the video to generate a new picture on reload.
src="https://picsum.photos/400/400"
Image Tag Attributes:
-
alt - Short for alternative text, this attribute always goes on an <img> tag and should contain a short description of the image.
- src - Tells the browser where the image is located. You can link to an image from your websiteβs files, or from an outside URL.
Further Reading:
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up