Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Embedding Images on one webpage?

  • 17-12-2009 1:32pm
    #1
    Closed Accounts Posts: 2,158 ✭✭✭


    Hey guys, total noob here, just need to make a very basic webpage for a cover of a project, but the images don't embed, like when I move the .html from document > desktop and view it in firefox, the images are blank with a red x on the top left of each.

    So my question is how to make the images stick to the .html?
    Please dont shoot me :o!


Comments

  • Registered Users, Registered Users 2 Posts: 515 ✭✭✭NeverSayDie


    Well, the images aren't in the .HTML file, they're separate files. You need to store those along with the page, or in some place that's pointed to by the <img> tags in the page - a /img directory if you want, for instance.

    Web pages usually don't just have single files - this boards.ie page you're viewing, for instance, will involve lots of other files - all those images for the smilies and icons, the ad up the top, some Javascript and CSS files, etc. You need to store them somewhere too.


  • Closed Accounts Posts: 2,158 ✭✭✭donmeister


    Well, the images aren't in the .HTML file, they're separate files. You need to store those along with the page, or in some place that's pointed to by the <img> tags in the page - a /img directory if you want, for instance.

    Web pages usually don't just have single files - this boards.ie page you're viewing, for instance, will involve lots of other files - all those images for the smilies and icons, the ad up the top, some Javascript and CSS files, etc. You need to store them somewhere too.

    Oh ok cool,thanks! So if I created a folder with the images in it, and don't move it anywhere, the images will so up?


  • Closed Accounts Posts: 8,305 ✭✭✭DOC09UNAM


    donmeister wrote: »
    Oh ok cool,thanks! So if I created a folder with the images in it, and don't move it anywhere, the images will so up?

    For instance, you have a folder like this.

    Folder name = webpage..

    in this folder you have webpage.html and picture.jpg.

    you need to go to your webpage.html and insert <img>Picture</img ="picture.jpg">


    If it's in the same folder, you don't need the location, but if it's in a folder up or down from it, then you do.


  • Registered Users, Registered Users 2 Posts: 515 ✭✭✭NeverSayDie


    donmeister wrote: »
    Oh ok cool,thanks! So if I created a folder with the images in it, and don't move it anywhere, the images will so up?

    Well, that likely depends on where the page is. The <img> tags in the page have to point to the location of the image files they refer to. If the page file is moved, those links may break. See here for more info - the bit about the "src" attribute;
    http://www.htmlkit.com/minit/pages/imgtag1.html


Advertisement