Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    dariusz88's Avatar
    dariusz88 is offline Junior
    Join Date
    Sep 2010
    Posts
    329
    Thanks
    0
    Thanked 6 Times in 5 Posts
    Feedback Score
    0

    Default How to include Alt tag to Image

    Hi,
    Have got one problem. Of course, I know how to include alt tag. The basic version is like that:
    <img src="" alt="" style="" />
    But what is happening when you use image as a background?! like that:

    <div style="background-image:url(http://www.best-hotels-travel.com/uploads/3/8/3/2/3832861/9246242_orig.png);width:375px;height:106px;">

    how to add alt to the background image ?????????
    Thank you for help, in advance

  2. #2
    hemender is offline Freshman
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    Sorry, but alt tag is not applied on background image.

  3. #3
    GMF
    GMF is offline Sophomore
    Join Date
    Dec 2011
    Posts
    94
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Feedback Score
    0

    Default

    Exactly

    Background Images don't need alt

    Small explanation
    Code:
    http://kevindees.cc/2011/09/css-background-images-dont-need-alt-text/

  4. #4
    ANDREAS ROELL is offline Sophomore
    Join Date
    Jul 2012
    Location
    Alaska
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    I guess it's not possible and not necessary.

  5. #5
    trishasharma is offline Senior
    Join Date
    May 2012
    Location
    chennai
    Posts
    511
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Feedback Score
    0

    Default

    Alt tag is unnecessary for background image..

  6. #6
    Gaqua77 is offline Freshman
    Join Date
    Jun 2012
    Posts
    44
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    Background image doesn't need any alt tag. Y do u need alt tag for it??

  7. #7
    basic279's Avatar
    basic279 is offline Freshman
    Join Date
    Aug 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    Thats what i was exactly looking for...thanks guys

  8. #8
    clarksparx is offline Freshman
    Join Date
    Mar 2013
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    alt tag use for image uploading in HTML designing. Here are given code for image uploading.

    <img src="image name" alt="Smiley face" height="42" width="42">

  9. #9
    wdc's Avatar
    wdc
    wdc is offline Junior
    Join Date
    Mar 2013
    Posts
    204
    Thanks
    1
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    Background images usually dont show any certain thing so programmers assume they dont need any description (alt), but when some photo image does not show or user dont want to load it, the text description (alt) can be very handy.
    $0.5 hosting, $4 VPS, $30 Dedi - Instant CPanel Hosting - Start hosting NOW
    WebHosting Forum

  10. #10
    chitra is offline Freshman
    Join Date
    May 2013
    Location
    Kerela
    Posts
    48
    Thanks
    1
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    I think its not possible to add alt tag for the background image and its not needed. Its better to specify the background image in the css.

    eg:

    body
    {
    background:url("http://www.best-hotels-travel.com/uploads/3/8/3/2/3832861/9246242_orig.png");
    width:357px;
    height:106px;
    }
    }

  11. #11
    CodyDeegan is offline Sophomore
    Join Date
    Feb 2013
    Location
    Philippines
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    It is not necessary, ethics is that we do not include background images using other websites.

  12. #12
    noahwilson is offline Freshman
    Join Date
    Mar 2013
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    yes background image not support alt tag. you can be use alt tag with web content image.

  13. #13
    marshal is offline Junior
    Join Date
    Jun 2011
    Posts
    237
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    I dont think like we can add atl tag for background image

  14. #14
    albert_mendosa is offline Freshman
    Join Date
    Apr 2013
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    Quote Originally Posted by marshal View Post
    I dont think like we can add atl tag for background image
    i agree with You marshal..

  15. #15
    annaharris is offline Sophomore
    Join Date
    Nov 2011
    Location
    Pleasanton, CA 94588, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    Alt tag is not for background image.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 11-30-2011, 12:09 PM
  2. PHP/Include question
    By elf in forum Web Development - Programming & Coding
    Replies: 1
    Last Post: 01-18-2011, 04:21 PM
  3. Dynamic Image Creation, Watermark on Image
    By manik in forum Web Development - Programming & Coding
    Replies: 13
    Last Post: 10-29-2010, 07:57 AM
  4. Image Link in Google Image
    By BrainPulse in forum Google
    Replies: 4
    Last Post: 05-03-2009, 04:08 AM
  5. Include this smiley please
    By krates98 in forum WebCosmo Forums
    Replies: 33
    Last Post: 12-27-2008, 12:01 AM

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
  •  
Partners: BOSTON WEB DEVELOPER, LLC   |   WEBCOSMO CLASSIFIEDS