I want to know how can i use images in html

Discussion in 'HTML & Website Design' started by jaisriram, Apr 22, 2007.

  1. #1
    Give me the code.How can i use image tag?
     
    jaisriram, Apr 22, 2007 IP
  2. SubJunk

    SubJunk Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Say your image, image.png, is located in the images folder of your root directory, just put:

    <img src="/images/image.png" alt="image description">

    If your site uses XHTML instead of HTML use:

    <img src="/images/image.png" alt="image description" />
     
    SubJunk, Apr 22, 2007 IP
  3. online

    online Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    here is the tag .

    <img src="filename with extension and full path" width= " " height="">
     
    online, Apr 23, 2007 IP
  4. sujit001

    sujit001 Peon

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This is the code
    <img src="image path" alt="image description" />
     
    sujit001, Apr 23, 2007 IP
  5. kernes

    kernes Peon

    Messages:
    184
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    this is the code

    <img src="your filename and your full path" width= " " height=" ">
     
    kernes, Apr 25, 2007 IP
  6. Arson

    Arson Well-Known Member

    Messages:
    622
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    120
    #6
    Code is:
    <img src="imageurl">
     
    Arson, Apr 25, 2007 IP
  7. zk0

    zk0 Peon

    Messages:
    299
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You dont need to put in width and height of the image. That is just crazyness.
     
    zk0, Apr 26, 2007 IP
  8. Neutrino

    Neutrino Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    /\ If the filesize of the images are large, width and height specs can help your pages load faster.
     
    Neutrino, Apr 27, 2007 IP
  9. zk0

    zk0 Peon

    Messages:
    299
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Not really. Do it properly and shrink the image using a image tool such as Adobe Photoshop. Also the standards says you shouldn't use width and height in your img code.
     
    zk0, Apr 28, 2007 IP
  10. Rickzkm

    Rickzkm Peon

    Messages:
    29
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    my advice about images:

    - If you are using more cascaded images on the page they should have size definitions otherwise they wil be "jumping" when they load. Html will load first and then images which wont look nice.
    - When using photos and images with lots of colours try 60-75% Jpeg compression to keep nice crisp images. For additional parts of desing, like borders, edges and such try using Gif with selection of colour numbers. That will keep images realy small.
    - Always use DESCRIPTIVE alt tag and also use descriptive file name! This is good SEO

    Example:

    <img src="http://www.empire-elements.co.uk/projects_images/th/fresh-surf-wear-ecommerce-website.jpg" alt="FRESH! surf wear ecommerce website" width="200" height="189" />
     
    Rickzkm, Apr 28, 2007 IP
  11. zk0

    zk0 Peon

    Messages:
    299
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    You should use the alt tag to properly explain what kind of image it is. For example if it's a picture on a dog your alt tag should be: alt="Image of a dog". And not some tags for your site like: "dogs fact all about dogs etc".

    Your example alt tag doesnt say anything about the image that makes sense. And like I've said before: you should not use width and height.
     
    zk0, Apr 28, 2007 IP
  12. Rickzkm

    Rickzkm Peon

    Messages:
    29
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Ha ha ha !
     
    Rickzkm, Apr 30, 2007 IP