IMPORT CSS FILE
To import any css file first of all you need to make a file in which you will use the different elements and then save the file using the extension css. i.e style.css, first.css etc.Then use the "@" sign with key word import to import the css file. i.e @import filename.css. By using this way you will avoid the redundancy of the code and used the same style through whole website and it will uniform the style in your whole web pages.
Here is the simple code:
The css file will be like this and save it with the name and extension .css like style.css in this case:
p
{
font-family:"Palatino Linotype";
font-size:12px;
color:#800040;
}
H1
{
font-size:18px;
color:#400080;
}
H2
{
font-size:16px;
font-family:"Lucida Console", Monaco, monospace;
color:inherit;
text-align:right;
}
H3
{
font-size:14px;
color:#0080FF;
text-align:center;
}
<title>CSS Importing File</title>tuy
</head>
<style type="text/css">
@import "style.css";
</style>
<body>
<h1> Style Using CSS File Import </h1>
<hr />
<p> To import any css file first of all you need to make a file in which you will use the different elements and then save the file using the extension css. i.e style.css, first.css etc. </p>
<p> Then use the "@" sign with key word import to import the css file. i.e @import filename.css. By using this way you will avoid the redundancy of the code and used the same style through whole website and it will uniform the style in your whole web pages.
</p>
Just chek out some other elements display:
<h2> Observe the Heading 2 :</h2>
<h3> Observe the Heading 3 </h3>
</body>
</html>
No comments:
Post a Comment