We can use CSS in visualforce page to define how a particular visualforce component will be displayed.
It saves a lot of styling work.
Let us see how we can use css as inline with a visualforce components also lets see how we can call a css class. All the element properties can be stored in a css class and then we have to just call that class against a particular element in visualforce page.
Below is a visualforce example where css has been used:
CSS class should be defined between style tags <style></style>
Also, we can write the css displays properties inline as done in the first three commandbuttons;