Logo - Albert Walicki

Style your selected text

::selection pseudo class selector allows to style selection of the text

Use ::selection pseduo class selector to change the style of the selected text. You can't change all CSS properties, but only these:

  • color

  • background-color

  • text-decoration

  • text-shadow

  • stroke-color, fill-color and stroke-width

Style your ::selection to match your website!

See more tips!

Attribute required can be styled with :required pseudo class selector

Required or not?

Logo - Albert Walicki

Hello, I'm a frontend developer with over six years of experience, freelancer. I'm also a mentor for junior frontend developers. I wrote a book for Junior Frontend developers called Frontend Unicorn.

BlogGlassmorphismAurora UIShapes in CSSUnique css illustrations

Get in touch!

Have a question or need a project? Contact me!

© 2020-present Albert Walicki. All Rights Reserved