var linkElement = document.createElement("link"); linkElement.rel = "stylesheet"; linkElement.href = "path/to/file.css"; //Replace here document.head.appendChild(linkElement);