Tuesday, 19 September 2017

Combine multiple css link into single link

A website has more than external css file which must be reference on page where it has to use. When a lot number of css file being used it increase complexity for web developer because of add many external link.


So for sake of simplicity of your web page. You can use @import. Which help you to add more than one external css file referenced by a single line? You need to add all your external css file reference into a single css file. Add this file link to your web page and enjoy compress coding….

CSS File


file1.css


h1
{
     color:red;
}


file2.css


h2
{
     color:green;
}

file3.css


h3
{
     color:blue;
}

main.css


@import "file1.css";
@import "file2.css";
@import "file3.css";

HTML File


<html>
<head>
<title>Multiple CSS file add : Girfa Student Help</title>
<style type="text/css">
@import url("main.css");
</style>
</head>
<body>
<h1>Girfa Student Help</h1>
<h2>Girfa Student Help</h2>
<h3>Girfa Student Help</h3>
</body>
</html>




No comments:

Post a Comment