Solved

Can an alt tag be placed inside an H1 tag?

Posted on 2008-06-19
7
1,041 Views
Last Modified: 2011-10-19
I wanted to jazz up my website and make the headers, which are in H1, now images. I would do an alt tag for those, but is it possible/SEO approved to place that alt tag inside the H1 tag?
0
Comment
Question by:mc2044
  • 3
7 Comments
 
LVL 7

Expert Comment

by:Zippit
ID: 21824381
I assume you mean you are going to use css to give the h1 a background image (via the background-image css tag).

If so, then no, not really.  However, you might try a "hack" like making a transparent image and positioning it over the h1 element and giving the img the alt text. But I'm not sure how a screen reader would interpret something like that.
0
 
LVL 7

Accepted Solution

by:
Zippit earned 125 total points
ID: 21825727
no.  Search engines will ignore any alt value on an H1 tag.  alt is not supported by H1.

If you convert it to an image then you are going to lose any advantage that the H1 text might have had.

You might want to try making that background image a "blank" image with no text.  Then you could make it the background-image of the H1 tag but still just put text into the H1 tag as normal.  You'd get the best of both worlds.

So something like the following:

<h1 style='background-image: url(blankbutton.gif);'>Pictures</h1>
0
 
LVL 7

Expert Comment

by:Zippit
ID: 21826202
This is a really great site for standards-compliant info on HTML/CSS/JavaScript etc:

http://www.w3schools.com/

I am not aware of any <alternative> tag.  I'm guessing they meant the alt attribute on the <img> tag.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Google Analytics Clicks 6 72
Questions & experiences on Uber taxi driving 7 96
Best place to leave a rating 4 86
Pdf to Mobi 1 28
Who was affected by the Google Panda Update? One of the main reasons that the Google Panda series of updates have been so widely discussed is that many high-profile websites lost a majority, or in some cases almost all of their Google search engine…
Why do people keep talking about the Panda Update? Google’s Panda updates continue to be a hot topic of discussion because they were game-changers.  Rand Fishkin at SEOMoz hosted an excellent video Whiteboard Friday (http://www.seomoz.org/blog/how-…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now