Can we use H1 Tag in Alt Tag ?

Discussion in 'Search Engine Optimization' started by faiz.khan, Sep 11, 2009.

  1. #1
    Hello All,

    I need to use H1 tag in my website index page i do not want to edit the CSS of the website. I do not have much text on the home page. If I use h1 tag in text the text size would obviously become bigger; therefore I thought to use it in the alt tag that has been used in the images.

    As, the Google is always going to read the alt tag should I use it this way ?

    Please suggest ... !


    Thanks
    Faiz
     
    faiz.khan, Sep 11, 2009 IP
  2. pneulameiro

    pneulameiro Peon

    Messages:
    440
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you can use the text in the alt tag AND the same text in the h1 tag. I hope you understand what I mean.
     
    pneulameiro, Sep 11, 2009 IP
  3. crysun2007

    crysun2007 Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    this is not a good way , dont do that
    the google webmaster blog have said it
     
    crysun2007, Sep 11, 2009 IP
  4. Sheri11

    Sheri11 Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    U cannot use h1 tag in Alt text in images, you can use only text as a alt text in images only
    h1 tag takes only text as a text only...
    thx
    :):confused:
     
    Sheri11, Sep 11, 2009 IP
  5. myfreeseotips

    myfreeseotips Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    dont use H1 tags in your alt tag...i mean why would you want to do it? it's poor coding practice...
     
    myfreeseotips, Sep 11, 2009 IP
  6. devji

    devji Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I'd have to agree with the others. Using H1 tags inside Alt attributes will cause a validation error. Some browsers may have issues displaying the page correctly or worse still, some search engines may have crawling issues.

    It wouldn't have thougt it would be too much effort to make the necessary amendments to the CSS, after all that's one of CSS's main advantages.
     
    devji, Sep 11, 2009 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #7
    As the others have said, you cannot use the ALT ATTRIBUTE (it's not a tag) inside the H1 heading. The only tag you can use it in is IMG. If you want to use an IMG inside a H1 you can, but you'll be wasting your time doing so.
     
    Dan Schulz, Sep 11, 2009 IP
  8. enous

    enous Well-Known Member

    Messages:
    1,500
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    158
    #8
    Yeah, I think this don't a good way,
    You know that , your customers doesn't know that's a H1 text when u use in ALT text.
     
    enous, Sep 11, 2009 IP
  9. NexsStep

    NexsStep Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Solution is, give a new style to your h1
    like <h1 class="yournewclass">yourtext</h1>
     
    NexsStep, Sep 12, 2009 IP
  10. seoperson

    seoperson Peon

    Messages:
    501
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #10
    It might get wasted but you can give it a try, IMO.
    Code like this: <h1><Img src="some source" alt="some keyword">

    See the effects of this after 7-15 days and come here to tell if you got what you wanted.
     
    seoperson, Sep 12, 2009 IP
  11. faiz.khan

    faiz.khan Active Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    76
    #11
    Thanks every one for sharing your thoughts !

    Specially to Dan Schulz... I m using the H1 tag in the following way :

    (<h1><img src="/images/banner.jpg" alt="Web hosting Mumbai, Web Designing Mumbai, Web Design company Mumbai " title="Title of the image" /></h1> ) .

    Can it be consider as ethical and google will read the h1 tag ?

    Please share

    Thanks
    Faiz

     
    faiz.khan, Sep 12, 2009 IP
  12. mdrobiul

    mdrobiul Peon

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    you can just apply <h1 style='font-size:10px;'>Your text</h1>
     
    mdrobiul, Sep 12, 2009 IP
  13. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Thats keyword stuffing. If you're going to use the image as a logo, USE IT AS A LOGO, and save the heading for its intended purpose. In other words, separate them and keep them separate. You know, like you should keep cesium separate from water. (Mixing the two would be like detonating a depth charge inside a bath tub.)
     
    Dan Schulz, Sep 15, 2009 IP
  14. webjyoti

    webjyoti Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You cant place h1 tag in alt tag. If you dont want to change the stylesheet of your site, then just add a class in your index page html for h1 tag .
     
    webjyoti, Sep 15, 2009 IP
  15. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #15
    There's no need to use a class on the H1 because there should only be one per page to begin with.
     
    Dan Schulz, Sep 15, 2009 IP
  16. popcorn plya

    popcorn plya Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    You can't do that but you can use a little whitehat image replacement technique.

    <h1 id="image">your text here</h1>

    in the CSS do

    #image {
    text-indent:-9999px;
    background:url('image.png');
    width:300px;
    height:300px;
    }
     
    popcorn plya, Sep 15, 2009 IP
  17. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #17
    That will cause accessibility issues. What you want to do is use an empty SPAN, set the position of the H1 to relative, and then absolutely position the span inside it.

    Like so:

    
    <h1>Heading Text<span></span></h1>
    
    h1 {
    	height: 80px;
    	overflow: hidden;
    	position: relative;
    	width: 200px;
    }
    
    h1 span {
    	background: url("/images/file.jpg");
    	position: absolute;
    		top: 0;
    		left: 0;
    }
    
    Code (markup):
    (Notes: this will not work with transparent images, and the width/height are just example values. Overflow is used to keep the text from bleeding outside the heading when the page text is resized.)
     
    Dan Schulz, Sep 15, 2009 IP
  18. faiz.khan

    faiz.khan Active Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    76
    #18
    Thanks Dan,

    I would try it and praying that it would work.

    Thanks
    Faiz

     
    faiz.khan, Sep 16, 2009 IP
  19. dhana_space2

    dhana_space2 Active Member

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #19
    Very good Question, If google does not going to like it..then i dont want to do it.
     
    dhana_space2, Sep 16, 2009 IP
  20. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #20
    No, it's not black hat. It's just semantically and structurally stupid.
     
    Dan Schulz, Sep 16, 2009 IP