HomeОбразованиеRelated VideosMore From: dcode

How to change the text highlight color and styles | HTML, CSS Tutorial

9 ratings | 559 views
Through the use of some basic CSS rules you are able to quite easily change the text color and background color of the area selected (or highlighted) by the user. This is done through the ::selection pseudo-element and is rather straightforward - however a slightly different syntax is required for support in Firefox. In this video I take you through a simple example of how you can use this in your next website or web project - but be careful because it is a concern to accessibility: you will need to make sure the new styles have enough contrast to be visible by visually impaired users. For your reference, check this out: https://developer.mozilla.org/en-US/docs/Web/CSS/::selection Follow me on Twitter @dcode! If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Html code for embedding videos on your blog
Text Comments (2)
ShouTZ (26 days ago)
thx man
dcode (17 days ago)
You're welcome

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.