In case you did not know inline style supersedes all other style rules that may be in effect via css that is defined via a style element or an external css file. So in some cases where it is call for the style api can be used to overwrite anything that may be in effect via that.
To get a style value that was set via the style attribute in the html a reference to the element in question must be obtained first. Then once there is a reference the style property of that reference is where the value will exist.
Setting inline style is just a matter of using the assignment operator with the desired property.