Also the code you were given is CSS so you can place inline as Greg has shown you or you can place it within a style tag like so ...
/* but make sure you declare what element you're styling */
/* code goes here! */
Also -webkit-linear-gradient is quite an old standard there is a new way that almost all the browsers support and it's using just the
rgb(255, 255, 0),
background-image as well. If you just do this with
background then you might reset other css properties declared elsewhere.
I hope this gives you a little more insight into linear-gradient. Google is your friend if you want to learn more