Answers for "how to link a stylesheet"

122

how to link css to html

<link rel="stylesheet" href="styles.css">
Posted by: Guest on November-28-2019
7

link stylesheet

<link rel="stylesheet" type="text/css" href="/style.css">
Posted by: Guest on April-19-2021
0

link external css

<link href="style.css" rel="stylesheet" type="text/css">
Posted by: Guest on June-16-2021
2

link stylesheet in javascript

var cssId = 'myCss';  // you could encode the css path itself to generate id..
if (!document.getElementById(cssId))
{
    var head  = document.getElementsByTagName('head')[0];
    var link  = document.createElement('link');
    link.id   = cssId;
    link.rel  = 'stylesheet';
    link.type = 'text/css';
    link.href = 'http://website.com/css/stylesheet.css';
    link.media = 'all';
    head.appendChild(link);
}
Posted by: Guest on October-16-2020
0

how to refer to external style sheet

<html>
<head>
<link rel="stylesheet" type="text/css" href="Name.css">
</head>
<body>
.
.
.
</body>
Posted by: Guest on August-05-2020
3

link stylesheet

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/morioh/dist/css/morioh.min.css">
Posted by: Guest on May-09-2021

Browse Popular Code Answers by Language