how to link css file in html using javascript code example
Example 1: how to link javascript to html and css
# Javascript
<script src="[file_name].js"></script>
# CSS
<link rel = "stylesheet" type="text/css" href = "style.css" />
Example 2: javascript add css file
var cssFile = document.createElement('link');
cssFile.rel = 'stylesheet';
cssFile.href = "styles.css"; // or path for file {themes('/styles/mobile.css')}
document.head.appendChild(cssFile); // append css to head element