Title says it all. Do search engines examine the content attribute of the :before and :after pseudo elements? I know it’s not the best place to put content, that CSS should be left for styling only, but sometimes the style dictates the content (for example, I think it is legitimate to display different content on different sized devices where the style adjusts according to that size). I don’t currently put anything I would care about a crawler finding in those elements but would like to know if it’s an option or not.
I tried finding the answer on Google and got no satisfactory results.
(for example, I think it is legitimate to display different content on different sized devices where the style adjusts according to that size).
It depends on what you mean by content….but I would disagree with this statement.
Pseudo elements are intended primarily for styling…other solutions exist to achieve content substitution.
As for whether crawlers can read the ‘content’ my first is to say ‘no’….they’re not in the DOM and there’s nothing to read….then again…I don’t work for Google.
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘CSS’ is closed to new topics and replies.