#foo { text-style: underline; background: rebeccapurple; } #foo:hover { background: greenyellow; }