Universal Properties

I picked up this tidbit looking at some random CSS code. I noticed that you can set universal properties with an asterisk like this:

* { color: blue; font-size: 1em;}

With this added within my CSS I set all the text to the color blue and the text size to 1em.This of course can be overridden if I set a text color and/or size to a separate selector like so:

.footer-text {color: red; size: 1.25em;}

See the results here: link.

Another universal attribute I picked up was ‘html.’ You can use ‘html’ just like I used the asterisk above:

html  {color: blue; font-size: 16px;}

You’ll get the same results. This isn’t rocket science or anything, but interesting to me as a novice.