Is there a way to dynamically inject a CSS link located in the middle of an HTML page into the head using JavaScript?
<head>
... styles here
</head>
<body>
code
<link href='http://fonts.googleapis.com/css?family=Lato:400,300,700,900' rel='stylesheet' type='text/css'>
</body>
I am looking for a JavaScript solution to automatically move the Google Fonts CSS link from the body to the head section. What would be the most straightforward approach to achieve this?