+ 4
Whenever I add images to html....doesnt show up in chrome browser ....???? HELP....
Chrome
21 Réponses
+ 4
I faced the same thing, when I was coding with my smartphone
+ 3
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Images Slider Gallery</title>
<style>
button {
margin-top: 30px;
float:left;
height:50px;
border:4px solid blue;
background-color:yellow;
border-radius:10px;
font-weight: bold;
}
img {
float:left;
margin-right: 10px;
margin-left: 10px;
}
</style>
</head>
<body>
<div>
<button onclick="prev()">Prev</button>
<img id="slider" src="Instagram.png"
width="150px" height="100px">
<button onclick="next()">Next</button>
</div>
<script>
var images= ['Instagram.png',
'Facebook.png', 'Twitter.png'];
var num=0;
function next() {
var slider= document.getElementById('slider');
num++;
if(num>=images.length) { nu
+ 2
Kaman Singh , you can try copying the location of image from properties.
+ 2
It depends if the picture is in the same folder as the html file
This is for local images <img src="/file path/">
+ 1
paste your code here
+ 1
Hey, can you just make a new program and share the link, that's what I meant
+ 1
How to get link of html file
+ 1
If you have pasted it in sololearn, save it, and then click on the share button (right top), copy the link and paste here
+ 1
where is rest of the script bro? that code is incomplete..
+ 1
Why incomplete? Css and js are both inside this code
+ 1
Scroll down,,...
0
Your code is absolutely fine, just make sure, the images are in same folder as the html document is, if it's so, try to provide absolute paths
0
Images are in same folder but still not working
0
Help
0
try to give absolute paths, it should be like
file:///.... your full path
0
How to give absolute path ....give me an example
0
I once had an issue of this sort. This is what you have to do. Make sure the image is in the folder of your HTML document. Let us take an instance that the image "fish.jpeg" is in the folder "images". Then your image tag in the document should look like this:
<img src="images/fish.jpeg" alt=""/>
Please contact me if this does not work. Thanks.
0
Sometimes if the file format is not the same, in the HTMl and the actual file, an example: in the HTML directory... image.jpg, in the document image.png, it won't work, you can right click the image file and select properties and view the file format(windows 10) or you can turn on "file name extensions" in file explorer(windows 10) that should help you out..