Adding Image in Html

Basic To Html Chap 2





How to Add Image In Web Page Using html

For adding image we use the tag of image which is
<img src="" alt="" width="" height=""> 
IN this tag src is used for image location alt is used if your 
 picture could not displayed because of some issue width &
height is used to set the height and width of image 

Let's see how to add image using image tag
First put your image in the same folder which have your 
html file now open your html using any editor like notepad
or visual studio 


Now Write img tag in html file so my picture name is 90.webp you can check your picture
full name and extension by clicking left & its properties so, in my case its picture of 
html css so, i am writing html css in alt.I want a medium size image so i am writing 
image width and height 300 and 300
so its html will be <img src="90.webp" alt="html css" height="300" width="300">

Now open your html file it will show picture



It will appear in browser if you open your html file
Like this




 IF you write the name of image wrong alt will show the text like this



Alt Showing in Browser



<!DOCTYPE html>
<html>
<head>
<title>abantechofficial</title>
</head>
<body>
<img src="90.webp" alt="html css" width="300" height="300">
</body>
</html>





No comments

Powered by Blogger.