I have a div
and I am placing some text in it via content
in :before
and :after
. Can Google crawlers read this?
Example:
div:after {
content: 'This is from CSS';
display:block;
}
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.
Sign up to join this communityI have a div
and I am placing some text in it via content
in :before
and :after
. Can Google crawlers read this?
Example:
div:after {
content: 'This is from CSS';
display:block;
}
Google does not reliably index text contained in JavaScript or CSS, even if it is visible to users on the page.
I found out about the JavaScript part recently when I asked How can I get Google to index content that is written into the page with JavaScript?
I also use text in css before on that site. If I search for the text that is in the CSS, Google does not know that those pages contain the text.