问题原文
原帖链接 · Shraga · CC BY-SA 3.0
We have a main image on every page of a website. This image includes some text.
We want to use text in image as h1 but to make it live text on image would be an issue because of responsiveness issues.
What if we place the h1 live text under the image (it would NOT be visible, using z-index etc.)?
Would this be an SEO issue and would Google not like this?
社区高分解答
原帖链接 · Raul Reyes · CC BY-SA 3.0
The <img> tag is classified by the living standard as Flow content, and <h1> </h1> accepts flow content. It is fine to use the image tag inside any heading tag.
In terms of SEO it will be an issue trying to present content visible to the bots but hidden from the user. According to google this is a direct violation of their guidelines. You can easily trigger a penalty by doing this if they detect algorithmically that you are trying to manipulate rankings that way.
However, you can still hide text from the user for legitimate purposes, such as accessibility.
According to WebAim there are a couple of techniques to hide content for the user but not from screen readers, this will allow people with disabilities to "see" the content but not regular users. This technique is about positioning the text off-screen:
.hidden {
left:-10000px;
}
There are some limitation of course, such as you can not use this technique if the image inside the H1 will be used as a link.
For more information about the techniques you can implement visit this page.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
