Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,208,956 members, 8,004,458 topics. Date: Saturday, 16 November 2024 at 04:34 PM |
Nairaland Forum / Science/Technology / Programming / Need Help With My Codes. (3096 Views)
Reading Other People's Codes/github Open Repo Projects / Xmas Codes / Free Udemy Courses 100% Free [coupon Codes Applied] (2) (3) (4)
Need Help With My Codes. by majesticguy: 8:21pm On Sep 20, 2021 |
I am new to coding(Html & Css) & i alternate between note++ & vs code. My problem is that, anytime I write a code and insert an image or a video in the same director as my html file, i end up with a broken image when I run the results on Google Chrome, while for the video, it doesn't play at all. All this happens when I work on my PC. Here's the code for my image <DOCTYPE html> <html> <head> <Metacharset="utf-8"/> <title> webpage 1</title> </head> <body> <img src="car.jpg" alt="car" width="800" height="600"/> </body> </html> Note: my image & html file are saved in the same folder on my PC. But when I run the same code via Quoda app on my phone, the image displays perfectly ( haven't tried the video) Please gurus in the house, what am I doing wrong on my PC, do I need internet connection enabled on my PC for it to show?? |
Re: Need Help With My Codes. by RealLordZeus(m): 8:55pm On Sep 20, 2021 |
<img src="car.jpg" alt="car" width="800" height="600"> |
Re: Need Help With My Codes. by LikeAking: 10:18pm On Sep 21, 2021 |
majesticguy: Check well you are getting something wrong |
Re: Need Help With My Codes. by nnamdiosu(m): 11:27pm On Sep 21, 2021 |
majesticguy: Don't type, snap the codes. That way we are sure of what you wrote. |
Re: Need Help With My Codes. by Lindner: 11:39pm On Sep 21, 2021 |
The file path "car.jpg" is wrong. If the image file is in the root directory, you need to do something like this "./car.jpg". If it's in a sub-directory, make sure you're referencing the right path. |
Re: Need Help With My Codes. by BigDawsNet: 8:04am On Sep 22, 2021 |
If the system path of the image file matches the URL of the browser path *exactly*, and the image still doesn't show, then the image file may be damaged You can crosscheck the heights size Probably your something is wrong with the particular browser...try other browser to confirm |
Re: Need Help With My Codes. by majesticguy: 3:36pm On Sep 22, 2021 |
LikeAking: I finally got it right. I unknowingly omitted a letter while spelling. I just copied the name on the image directly & pasted it on vs code, ran it through chrome and voila!! It displayed... Thanks to everyone who contributed. |
Re: Need Help With My Codes. by majesticguy: 3:37pm On Sep 22, 2021 |
Thanks guys, I finally got it working. |
Re: Need Help With My Codes. by LikeAking: 6:54pm On Sep 22, 2021 |
majesticguy: Nice |
(1) (Reply)
Hotel Booking And Reservation Assignment For A 200level Student (c++). / Your Toughest Algorithm / Can Not Run My Applet In A Web Browser
(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. 21 |