how to link external css file in js code example
Example 1: javascript css link append
document.getElementsByTagName("head")[0].insertAdjacentHTML(
"beforeend",
"<link rel=\"stylesheet\" href=\"path/to/style.css\" />");
Example 2: js add css to document
document.querySelector('head').innerHTML += '<link rel="stylesheet" href="styles.css" type="text/css"/>';