r/HTML • u/krustykrab99 • 24d ago
File Destination help on Macs
Okay I am really really really new to all of this and so I think I'm probably just missing something super obvious.
Basically I'm learning to use HTML because I just want to create my own very simple webpage just for personal use (for fun really). Anyway, I'm to the part in learning where I am trying to embed images or links into the page. It works if I use a webpage that already exists but I can't figure out how to embed an HTML file from my computer or an image. I think my settings are correct for sharing, I turned off smart quotes and smart dashes etc. I'm worried it's the path name because everything just looks and is named differently on macbooks. I've tried searching and searching online to figure out what I'm doing wrong but I just can't figure it out. Any help would be appreciated.
4
u/AmanBabuHemant 24d ago
Try copy pasting your image's path from your file manager.
And just to make sure, your HTML also lives on your computer, right?
If this still don't work try copy link of an image from internet and try if that works.
2
u/nia_do 24d ago
If you right click on a file you should be able to copy the relative/absolute address. Then you can use that address.
4
u/phn-cloudsnake 24d ago
Check w3schools, they explain everything related to web development.
1
u/silenziosa 24d ago
I am new at this too so there might be better ways.
I’m using VScode. I had this issue with uploading images, what worked was:
Save all of ur website files to one folder
Create a subfolder within that folder (“images”)
<img src=“images/example.png”>
Also check that they match exactly, including uppercase or lowercase
1
u/-svde- 24d ago
when you say embed links, do you mean like with a frame-box like an iframe? as in you have a box where another site shows up? or do you mean have a link show up as clickable?
if you mean an iframe, you would do
<iframe src="https://example.com"></iframe><a href="https://example.com">clickble text you want to use</a>is the easiest way to hyperlink in htmlfor images, if the image file is in the same folder as the html file
<img src="picture.jpg">if it's in a subfolder like /images
<img src="images/picture.jpg">and if it's on another website
<img src="https://url-to-image.com/image-name.jpg">there're a lot of other operators/attributes you can add to both urls/images but these are the most basic to get them to show up