Enriching Web Pages: Adding Images
Explore how to add images to web pages using the HTML img tag. Understand the use of src for image source paths, alt for alternative text, and how width and height attributes affect image display. Practice inserting images to improve your web page visuals.
We'll cover the following...
We'll cover the following...
The above is especially true for web pages.
HTML provides the <img> tag to display images in your pages. The src attribute of <img> describes the URL, relative to the current page ,where the picture can be loaded from.
For example, if you have two image files named picture1.png and picture2.jpg stored in the content\images folder, and your document is in the root web folder, you can use the following markup to display them:
<img src="content/images/picture1.png" />
...