My website has a stylesheet defined in the header as style.css with a selector:
<div class="myClass" style="background:#fff;"> </div>
Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority:
1.Browser default 2. External style sheet 3. Internal style sheet (in the head section) 4.Inline style (inside an HTML element)
W3schools explains a lot about CSS and also goes through and shows examples of most things you can do with CSS. Always a good resource if you have questions about something.