Solved

Can an alt tag be placed inside an H1 tag?

Posted on 2008-06-19
7
1,067 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 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Online promotion is consistently becoming more important for all types of businesses. From Facebook ads to search engines to YouTube videos, there are all sorts of channels that can effectively be used to promote a business or product. But how shoul…
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:
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

734 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