Not getting the image on the webpage even the image is in the same folder where the HTML file exists!
You once check the syntax whether it is in the correct format as below or not.
url=image address in the pc.
If it is in the correct format then once again place the address of the image by right click and copy it from the properties and paste it in the url.
Can you share the HTML code here? There could be an issue in your HTML code.
To debug the issue open console in chrome and check for the error.
This is a very common issue. The following steps maybe useful:
- Create a new html file copy the code in it.
If step 1 does not work, then it means that you have done some minor mistake in coding.
First check the syntax.
Now to get the correct path, right-click on the icon of the image, in that select properties and then you will find the address of the folder you are in. Copy that address.
Suppose the address is: C:\Users\Addon\Desktop\Bolt IoT
now add to it the name of the image.extension
Suppose the name of image file is rockstar and its extension is png then the final path will be:
so your code will look like:
img src = “C:\Users\Addon\Desktop\Bolt IoT\rockstar.png”
Don’t forget to add the <> brackets
check the address and check if all tags are closed or not
if you want to adjust size of your image then use otherwise leave it
In the img tag you have used the attribute “scr” it should be “src” which translates to source or the path where the intended image exists.
REFER THIS LINK FOR FUTHER INFORMATION ON IMG TAG: https://www.w3schools.com/tags/tag_img.asp
either you haven`t write the codes right or you used different tags.you can go on search for w3school for better understanding the concept of html tags.always be attentive when you used the tags.
By looking at your picture I think the bolt image is not in the same directory where you saved your html file.Once check it.
–Try to paste the complete address of bolt_logo.png by right clicking on the picture.
Try these steps:
1.Right click on the picture and go to the properties.
2.You will see “location:” and copy the entire text there.
3.Now paste the text in the "src=’.
IF Not THEN LEAVE THE ABOVE STEPS AND FOLLOW THESE:
1.Place your image in the same directory of html file.
2.ONE more thing the syntax should be <img src="bolt_logo.png width=“118” height=“31”>
YOU WROTE SCR IN PLACE OF SRC CHECK IT ONCE.
3.Now save the changes and refresh it.
Still if u you have any doubts kindly check: https://www.w3schools.com/html/html_images.asp![2019-12-13|690x466]
Firstly you check the path that you have given in . If the path is correctly entered check whether you have entered format (.png .jpeg) of the image in the src feild.
Check the syntax below if you have added the file from your pc
<html> <body> <img src="D:\S6\CV.png"> <!-- <img src="pathname.format "> --> </body> </html>
Here are the following steps you can do to embed an image to the webpage
1.Create a folder. Make sure that the html file and the image are on the same folder.
2. The syntax for embedding image is
3.Here is a pic of the simple code i have done
4.After that , save using control+S
5.Open the file in chrome using control+o and then select the html file.
6.Here is an example of mine.
From the above image I can see that in the “img” tag you have misspelled the attribute “src” with “scr”.
You need to make the correction here:-
You should also make sure that your image file is in the same directory as your html file.
I hope that I was able to help you.
For more reference you can use the links:-
In img tag we use src attribute that defines the path of the image
The output is