How can I convert embedded css codes to external javascript (link)?

hello,

I want to convert the following embedded css code to link (external).

img.top {vertical-align:text-top;}

could you advise how I should write this code in my JavaScript file? what is the rule?

I have no idea what you mean. Do you want to put the css in an external css file - which is what <link> does? Or do you want javascript to execute the css…somehow?