How to add images to web page:
The code to add image to your page is shown below:
syntax:
<img src="image url/local path" alt="alternate text" title="title likea tooltip">
img attributes:
src: you can copy image address from the web and paste it in src or you can download the image and link it from your project directory.
alt: alt attribute is important as it is used to add alternate text when the image is not downloaded by the browser and also it is necessary for web accessibility.
title: it shows a tool tip when hovered on the image , it is optional to add but i suggest to add it for user experience on the page.
example:
<img src="imagename.jpg" alt="alt text">
<img src="https://unsplash.it/200" alt="online img address">
Post a Comment