I found many posts about that but I still can't find a clear answer. I read many texts saying that the H1 tag must have text description and we can't used it with img like logo. However, in many projects, I've got problem to use H1 on the top of homepage or single page because of structure concept.
Other pages use many different solutions, like:
www.smashingmagazine.com/articles/
use many H1 tags on single page
Use H1 that are placed immediately after header and is hidden (not display: none)
After all that I'm wondering on solution like below:
<h1>
<span>[page description]</span>
<a href="[home link]"><img src="[logo link]" alt="[short name]"></a>
</h1>
and css:
h1, a {
display: inline-block;
overflow: hidden;
position: relative;
}
span {
display: inline-block;
height: 100%;
width: 100%;
position: absolute;
z-index: -1;
white-space: nowrap;
}
My website is based on WordPress, so this way I want to use on homepage, pages and categories (description will be dynamic not static) while on single post pages I want to remove H1 and span from logo and use H1 with post title in content area.
Is this good idea or bad (especially for SEO)?