Seeking guidance on how to convert CSS from a stylesheet into inline styles directly within an HTML document using JavaScript. The search results I've found so far have been somewhat irrelevant to what I'm looking for.
To clarify, I am looking for a way to combine CSS and HTML strings in order to create an HTML document with all styles applied inline. I'm curious if there is a script available that can achieve this.
The ultimate goal is to produce an HTML email without the need for external linked CSS files, instead utilizing both CSS and HTML within the same document.