Note: This was written before CSS transitions were widely available (they had just come out, and browser support was insufficient). If you were doing this today then use CSS transitions, and not javascript.
Yes, you need javascript. jQuery makes it easier.
I'm not so sure you should be doing that as a beginner, but:
You will need to include the jQuery library in a script tag:
<SCRIPT type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></SCRIPT>
Then:
<SCRIPT type="text/javascript">
$(function() {
$('a').hover(
function() { $(this).animate( { backgroundColor: '#d1d1d1', color: '#fff' } ) },
function() { $(this).animate( { backgroundColor: '', color: '' } ) }
);
});
</SCRIPT>