Within headers, images with alt text vs. text
Do search engines treat the alt text of an image placed within an h1 tag the same way they would treat regular text placed in an h1 tag?
I gave a search through here looking for an answer to this question, but was only able to find information on image replacement and the infamous h1 debate.
For example would:
<h1><img src="#" alt="Contact Us" /></h1>
Act the same as:
<h1>Contact Us</h1>
In the electron开发者_如何学Goic eye of a search engine?
This seems considerably less "CSS Hacky" than other image replacement techniques like negative text indents, display:none, height:0, or ridiculous z-index integers.
I agree, in an ideal world, we could use image alt within a h1 and be confident about our searchability. As far as I know (and according to this blog) Google ranks this:
<h1>Title</h1>
Higher than this:
<h1><img alt="Title" src="image.jpg"/></h1>
While Yahoo and Bing will not index the image Alt as a page title.
I use a negative text indent personally.
As long as direct text in h1 tag ranks better (has stronger influence on page) than alt in image you could consider image replacing techniques like Rowan suggested
Treat your html document like a book with chapters... What would be more readable for you ? a page chapter, that is titled with text or an image?
You could use the object tag for the image, and provide alternative content within the object tag.
<h1><object data="contact-us.jpg" title="Contact Us">Contact Us</object></h1>
This way the robot sees the text and users see the image.
精彩评论