What's worse: hide text or delete text?

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?

+3
source share
6 answers

, "", , , . , . , . display: none;

, Google. SEO . "indent" , , -, .

+2

: SEO Google , - , , , .

, SEO.

, , - . - , ..

+2

. : / : ( ), , .

BOTH title ( rel). , . . http://css-discuss.incutio.com/wiki/Image_Replacement.

- , :

.some-element { 
    display: block;
    overflow: hidden;
    height: 0;
}
+1

. . SEO ( @simplemotives title, rel).

, , "" . , .

0

, Google ( ), - , , . ( ) , , .

The best way is to directly use the logo as the image inside your anchor tag. Give "alt" to your image. This will be ideal for reading the bot, and will also help in the search for images.

This is right from the mouth of the horse: http://www.youtube.com/watch?v=fBLvn_WkDJ4

0
source

Source: https://habr.com/ru/post/1768131/


All Articles