I have been working in a JavaScript file and my content has been working with phrases. Now I want to change the style of those phrases. The first function (see function swap
Using element.style you can change css from Javascript.
element.style
For example:
document.getElementById('mydiv').style.backgroundColor = 'red';
And to help you find the exact syntax for the attribute, here's CSS Properties To JavaScript Reference Conversion.