I'm trying to find the right balance here, so I wanted to see if anyone knew which scenario below is better in terms of semantic markup and SEO.
Using the logo of this site, scenario 1:
<div id="hlogo">
<a href="/">Stack Overflow</a>
</div>
#hlogo a {
width:250px;
height:61px;
display:block;
background-position:0 0;
text-indent:-999999em;
float:left;}
Or is it better to avoid hiding the text and just use the rel attribute in the anchor tag?
<div id="hlogo">
<a href="/" rel="Stack Overflow"></a>
</div>
#hlogo a {
width:250px;
height:61px;
display:block;
background-position:0 0;
float:left;}
I am wondering if the actual text “Stack Overflow” will remove is a bigger SEO hit than hiding the text. Everyone seems to use the text-indent method, although Google says no. What is the best way to achieve this for semantic markup and SEO?
Jiert source
share