function loadCSS(filename){ var file = document.createElement("link"); file.setAttribute("rel", "stylesheet"); file.setAttribute("type", "text/css"); file.setAttribute("href", filename); document.head.appendChild(file); } //just call a function to load your CSS //this path should be relative your HTML location loadCSS("https://api.akasa.lk/websites/musp.org.css");