Next: Style your highlighted answers from Google search
Thomas Steiner, a web developer advocate at Google, said you'll soon be able to style a text snippet that the URL highlights on pages with the target-text pseudo-class. So instead of the highlighted text being yellow, it could be blue, green, purple or whatever you want.
This is the feature where Google highlights your text on a page after you click on a featured snippet.
Here is his message on Twitter:
You will soon be able to style the highlighting of a URL text fragment(https://t.co/WhCJhCpe4w) on pages with the pseudo class `::target-text` (details : https://t.co/aH7udfG869)
.
" css
::target-text {
background-color: purple ;
}
" `Now: #:~:text=foo →
Coming soon: #:~:text=foo →- Thomas Steiner (@tomayac) October 15, 2020
Here is how it works, look for[adsense pop up ads]; one of the few feature snippets I left on this site and you get this:
Click on it and you will see that it scrolls down to the part of this content that it used above and highlights it:
Note that the yellow might be a different color in the future, if I decide to style it.
Discussion forum on Twitter.