How do I wright the shorter version of the <img> tag in html?

Clay

New member
Whenever I type the code to show an image, I have to type:
<img src="file:///c:/users/user/pictures/image.jpg"> for an example, but every example I read online shows that I can just type:
<img src="image.jpg"> Whenever I try this format, I just get an empty box with a red X in the corner. I don't mind typing the long hand version but if it's possible to use the short version, I'd love to know how.
 
When you upload your site to the server all the images should be getting pulled from an images folder on the server, not your C: drive. So what you need to do is set up a folder on your local machine that mimicks what your file structure on the site is going to look like. Then the img tag should say <img src="images/image.jpg">.

Basically inside the public_html folder should be a folder for images, a folder for javascript (if you are using it), I make a folder for any templates I might be using...etc. That way the main folder will stay uncluttered with a bunch of different files.
 
Back
Top