What's the correct way to hide the

tag and not be banned from Google?

前端 未结 10 1498
予麋鹿
予麋鹿 2021-02-07 00:54

The website I am working on uses an image defined in CSS as the main logo. The html code looks like this:

Something.com | The best something ever

10条回答
  •  轮回少年
    2021-02-07 01:11

    You should be fine with visibility: hidden.

    That said, if your image is part of the content (and I would dare to say that a company logo is content, not presentation), and you care about accessible html, you should consider changing your code to include the image as a img element with title and alternate text, instead of a css background-image.

    Additionally, if you hope to attract search engines to the keywords inside the

    element, you might want to include those words more than once in the page. The page title is a much more relevant place than the h1 element, for example.

提交回复
热议问题