Home HTML CSS JAVASCRIPT BOOTSTRAP Python Docker ML tutorial About us Privacy policy

Images in html



Images In HTML



In HTML we can add images very easily without any issues. We use <image> tag to add images on the web pages.It is a self closing tag we don't need to close it.
Syntax
<image src="image name" alt="image text">






Access images from another location

We can also access images when they located at some another folder or locations. We just need to include folder name and separate with back slash(/).

alt attribute

alt attribute is used to hide text behind a image.If some how our image is not showing then we can display text which is related to the image .


Image height and width

We can set height and width of an image according to our requirement without any problem.We just need to add height and width attributes inside image tag.

Images as a link

We can also add link behind an image so that when user click on the image so he will be able to redirect on the another web page.

float property

We use float property to move our image left ,rigt,top ,bottom according to our requirement.