Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,715 members, 7,955,688 topics. Date: Sunday, 22 September 2024 at 12:52 PM |
Nairaland Forum / Science/Technology / Programming / Why Isn't The Working Please Help?? (826 Views)
Macos Isn't The Second Most Popular OS Anymore / Web Development Isn't Lucrative Anymore. / The Working Dead: IT Jobs Bound For Extinction (2) (3) (4)
Why Isn't The Working Please Help?? by Nobody: 4:11pm On Jun 27, 2020 |
I've searched many YouTube views of how to add images in folders to HTML files, I still can't do it I don't know what I'm doing wrong. Since yesterday I've been trying to get it to work. I want to upload an image from my laptop then add it to my HTML work so it can show in browser. I've renamed the picture and did it exactly as I saw on YouTube, yet it still not working Picture one is my HTML sample while picture 2 is the result.
|
Re: Why Isn't The Working Please Help?? by FreakDesign: 4:13pm On Jun 27, 2020 |
The image location might be wrong |
Re: Why Isn't The Working Please Help?? by Nobody: 4:14pm On Jun 27, 2020 |
FreakDesign:how please I don't understand. I just renamed the first picture on my laptop, then type the name and added jpg to it. What is image location?? |
Re: Why Isn't The Working Please Help?? by FreakDesign: 4:16pm On Jun 27, 2020 |
TheGodlessGod:this image where did you save it? |
Re: Why Isn't The Working Please Help?? by Nobody: 4:20pm On Jun 27, 2020 |
FreakDesign:it's one of my childhood picture, I transferred it from my phone to the laptop. These are some details I could find. |
Re: Why Isn't The Working Please Help?? by Nobody: 4:21pm On Jun 27, 2020 |
.. |
Re: Why Isn't The Working Please Help?? by FreakDesign: 4:24pm On Jun 27, 2020 |
TheGodlessGod:OK now change it to... <img src="C:\Users\user\Pictures\mine.jpg /> And try again |
Re: Why Isn't The Working Please Help?? by RealLordZeus(m): 4:30pm On Jun 27, 2020 |
Move the picture into the same folder u have the file(webpage) |
Re: Why Isn't The Working Please Help?? by Nobody: 4:37pm On Jun 27, 2020 |
FreakDesign:it worked. Thanks alot |
Re: Why Isn't The Working Please Help?? by Nobody: 4:37pm On Jun 27, 2020 |
RealLordZeus:how can I do that? |
Re: Why Isn't The Working Please Help?? by FreakDesign: 4:38pm On Jun 27, 2020 |
TheGodlessGod:hits OK bro 1 Like |
Re: Why Isn't The Working Please Help?? by RealLordZeus(m): 4:38pm On Jun 27, 2020 |
TheGodlessGod:Your HTML file, where is the location?? Put the picture beside it |
Re: Why Isn't The Working Please Help?? by Nobody: 4:41pm On Jun 27, 2020 |
RealLordZeus:in the documents section
|
Re: Why Isn't The Working Please Help?? by RealLordZeus(m): 4:46pm On Jun 27, 2020 |
TheGodlessGod:Place the image there, and set your code back as it was before |
Re: Why Isn't The Working Please Help?? by Bloggingtips(m): 4:46pm On Jun 27, 2020 |
TheGodlessFod, don't use full image path as it will later hurt when you start css animations. Follow this Create a folder to accommodate your code projects. Let your code projects have another one. E.g myProjects as the overall folder, then another folder called 'myCodes' should be inside the myProjects and let your code works be stored there Then create another folder called 'images' inside the myProjects folder then store all your pictures there. Then in your codes in the myCodes folder, link your pictures there this way background-image: url(../images/myself.png). This should work NB: your picture extension could be jpg, png, gif or anyone. Just write in the appropriate one. All thansk to emmyloyalty |
Re: Why Isn't The Working Please Help?? by Nobody: 5:14pm On Jun 27, 2020 |
Bloggingtips:thank you for taking your time writing this. I've read it thoroughly though I've a few problems( I'm a novice in this stuffs). 1. When you said I should create a folder to accommodate my code projects, I don't understand that. I just simply copy my HTML file to the place where "code project" is. Please explain better. 2. Secondly I've already transferred my pictures to the image folder you told me to create, the issue is linking it. Do you mean when adding images to the HTML, I should just add "url(../images/myself.png)".?? Thanks again |
Re: Why Isn't The Working Please Help?? by Nobody: 5:17pm On Jun 27, 2020 |
This is the folder you asked me to create. The second picture is what I don't understand, how should I accommodate my codes in the folder?. Do you mean to copy and paste the HTML file like I did?
|
Re: Why Isn't The Working Please Help?? by Bloggingtips(m): 5:22pm On Jun 27, 2020 |
TheGodlessGod: Copy your html file in my code folder |
Re: Why Isn't The Working Please Help?? by Bloggingtips(m): 5:23pm On Jun 27, 2020 |
Then link your images with ../images/img.jpg The theory behind this is because images belong to a different folder. If it doesn't work then something else is wrong, inform me If anyone is telling you to do full path, when you do css, there will be challenges |
Re: Why Isn't The Working Please Help?? by Emmyloyalty: 5:32pm On Jun 27, 2020 |
Bloggingtips: @op, follow this you'll get it. Bloggingtips, I like your zeal. More code to your codebase, brother. |
Re: Why Isn't The Working Please Help?? by Nobody: 6:02pm On Jun 27, 2020 |
Bloggingtips:thanks for your contribution. This is really complicated for me, I tried copying the photos to the new image folder I created. That is an image location, do I need to type all that into the HTML?
|
Re: Why Isn't The Working Please Help?? by Nobody: 6:07pm On Jun 27, 2020 |
I just typed the new location of the file on the HTML and it still works.
|
Re: Why Isn't The Working Please Help?? by QuantumR: 6:40pm On Jun 27, 2020 |
What they r u to do is to let the picture be in the same folder with your index.html file Then do this <img src="./name of the picture.jpg"> //.png depending on the extension If u still dnt understand then u need go back to study |
Re: Why Isn't The Working Please Help?? by Nobody: 7:29pm On Jun 27, 2020 |
QuantumR:but index.html is in a notepad. I can't copy/move pictures or anything to it |
Re: Why Isn't The Working Please Help?? by Bloggingtips(m): 7:33pm On Jun 27, 2020 |
TheGodlessGod: Use ../images/index.html It should work |
Re: Why Isn't The Working Please Help?? by tensazangetsu20(m): 8:42pm On Jun 27, 2020 |
Op I notice you are using notepad to write your codes. Please download visual studio code. |
Re: Why Isn't The Working Please Help?? by RealLordZeus(m): 9:14pm On Jun 27, 2020 |
Na wa for u op ooo, upon all this so so explanation.. Well, go to your desktop ,create a folder named "code" Inside that folder, place your "index.HTML" file and the image, then revert your code to how it was in the beginning. The picture should display. For a more arranged process. Inside the code folder Create another folder with the name "images" Move/copy the image into the new folder (images) Then edit your code to <img src="images/mypicname.jpg"/> If you still don't understand, pls learn another work |
Re: Why Isn't The Working Please Help?? by omoluabiguy(m): 1:00am On Jun 28, 2020 |
You should put the full path. Learn how to code from my channel. Subscribe to my YouTube channel and watch my videos. You’ll be glad you subscribed https://www.youtube.com/channel/UCwNrlP_X_VV4vg00P2QmDnw |
(1) (Reply)
How The Interview Went. / Learn These Skills For Free / Help needed Deploying Python Application
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 31 |