Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can an alt tag be placed inside an H1 tag?

Posted on 2008-06-19
7
Medium Priority
?
1,080 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Read this article and get to know some best tips for outsourcing client PPC work to a white label PPC agency.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
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.

721 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