It is best to put everything in an external css file. If you must have an inline style, make sure that you have only those that are not yet defined in your external style sheet. I dont duplicate / redefine the style. for example, if your css file has the following:
div { padding: 5px; }
then does not have the following inline style.
<div style="padding-right:2px;" />
Just put it in a css file
div { padding: 5px 2px 5px 5px; }
As you said, you can use !important if you have to override the style for only one page, which does not apply to other pages on your site.
source share