Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2011
    Location
    California
    Posts
    19
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Img source problems for my Website

    When im writing the code for puting an image in HTML you put the path to get to the image in your computer. but in my wensite ive been writing the code directly on the website so it isnt stored on my computer. So what do i write in the source attribute to put an image on there?

  • #2
    Regular Coder
    Join Date
    Jul 2011
    Location
    India
    Posts
    496
    Thanks
    3
    Thanked 57 Times in 56 Posts
    If image is in same folder on server, then simply you can write

    Code:
    <img src="imagename.png" alt="Image" width="100" height="100" />
    If your image is placed in any sub-folder, then path would be

    Code:
    <img src="foldername/imagename.png" alt="Image" width="100" height="100" />


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •