Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

CSS :root Selector

Assign styles to the root, <html> element by assigning them to a :root style block:

:root {
  background: red;

Now, when you open up your web page, you’ll see that the <html> element has a red background! Preeetty cool right?!