Mobile app version of vmapp.org
Login or Join
Kevin317

: Can Google crawlers/googlebot read CSS content in before and after elements? I have a div and I am placing some text in it via content in :before and :after. Can Google crawlers read this?

@Kevin317

Posted in: #Css #Google #Googlebot #WebCrawlers

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;
}


Working Example

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme