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

HTML!!help me please!!

Options
  • 27-11-2006 2:57pm
    #1
    Closed Accounts Posts: 73 ✭✭


    Hello all,

    I only started on HTML last night,I'me doing ok so far,linking to other pages,linking half way to different pages and on my page,adding color etc...

    But I can't seem to code pictures into my code!! :(

    As an example....

    <img src="Laughing_Man.jpg" width="267" height="200" alt="laughing man">

    is what I'm using.The picture is in the same folder as the HTML file for my page,I don't know if I'm missing something here!Any help would be greatly appreciated!I haven't found anything by googleing by the way! :(

    and yes...I am a nOOb,so no need ro call me one! :P


    Paul


Comments

  • Closed Accounts Posts: 6,131 ✭✭✭subway


    nothing wrong with the code
    for simplicty try <img src="laughing_man.jpg">

    sometimes the case can be important in html, so make sure the file isnt called LAUGHING_MAN etc


  • Registered Users Posts: 2,781 ✭✭✭amen


    try putting the img tag on on a page on its own first and make sure it works then move to your main page

    If I were you I would create an images folder and put them all in there

    are there any unclosed tags on your page?
    this could cause some issues


  • Registered Users Posts: 1,821 ✭✭✭Skud


    could have the image in the wrong folder as well. The way your calling it should be in the same folder as the html file...


  • Closed Accounts Posts: 73 ✭✭boss^is^dead


    ok so I tried one on a page of it's own!

    Didn't work!



    ok,lets say you had a picture called laughing man, in a folder called HTML(our picture is in here)
    and this folder is in your My Pictures folder.

    what would your tag be??

    sorry to drag this out lads :(


  • Closed Accounts Posts: 6,131 ✭✭✭subway


    try the full path of the fpicture
    <img src="C:\Documents and Settings\boss^is^dead\My Documents\my pictures\html\laughing_man.jpg">


  • Advertisement
  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    ok,lets say you had a picture called laughing man, in a folder called HTML(our picture is in here)
    and this folder is in your My Pictures folder.

    what would your tag be??
    That's all a little vague.

    Where is the html file located? Linking to an image like this :

    <img src="laughing_man.jpg">

    ..assums that "laughing_man.jpg" is in the same folder as the HTML file. A common enough way of doing things is to create a folder called simply "images" as a sub-directory of the folder in which your HTML files sit.

    So your file structure is :

    /html/ (html goes here)
    /html/images/ (images go here)

    Now, the image tag will look like this :

    <img src="images/laughing_man.jpg">


    All filenames in HTML must be exact. laughing_man.jpg, Laughing_Man.jpg and laughing_man.JPG are three different files. You must get the case right, and remove any spaces from your filenames.


  • Registered Users Posts: 1,772 ✭✭✭woolymammoth


    There's nothing wrong with using tools to learn HTML, you don't have to write all of the code yourself!

    But if you're a devil for punishment, you can still use the web for help!

    oh, and save yourself a whole lotta trouble, put the picture in the same folder as the html file, not somewhere completely different on the hard disk, and use the tag "./pic.jpg" instead.


  • Closed Accounts Posts: 73 ✭✭boss^is^dead


    JOY!!

    thanks alot you guys!

    Got it up and running!

    I think my problem was that the picture I was using was called Laughing_Man.jpg

    which means I'd have to call the tag like this:

    <img src="Laughing_Man.jpg.jpg">

    so I took the .jpg bit off the actual filename so now it's working with just one .jpg at the end!!

    Thanks again you lot!! :P

    wOOt!!


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Goodshape wrote:
    All filenames in HTML must be exact. laughing_man.jpg, Laughing_Man.jpg and laughing_man.JPG are three different files. You must get the case right, and remove any spaces from your filenames.

    Windows based webservers won't make any distinction between upper and lowercase filenames.


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    eoin_s wrote:
    Windows based webservers won't make any distinction between upper and lowercase filenames.
    Regardless, I'd consider it a good idea to keep your filename cases in check. Windows might be too stupid to make the distinction, but move your site to a real webserver and you're going to be in trouble.

    Windows not paying attention to filename case is right up there with hiding the file extension by default (which is what lead to the OP's troubles here) on my 'List of Windows Annoyances'.


  • Advertisement
  • Moderators, Education Moderators Posts: 2,432 Mod ✭✭✭✭Peteee


    Goodshape wrote:
    Regardless, I'd consider it a good idea to keep your filename cases in check. Windows might be too stupid to make the distinction, but move your site to a real webserver and you're going to be in trouble.

    Windows not paying attention to filename case is right up there with hiding the file extension by default (which is what lead to the OP's troubles here) on my 'List of Windows Annoyances'.

    I'd actually consider it a nice feature of Windows.

    Many a time I'd fire up emacs, Open up work.txt, and to my horror have it open up a blank document, when I was sure I saved it as Work.txt...oh wait the cases are different :)

    Similarly with windows/*nix webservers


Advertisement