+ 3
How can I store the formatting css in different file and make it appear in my html website
Merging Css with Html
6 Respostas
0
Then if you used the inline or internal style, you don't need to save the CSS. all you need to do is to save the html file with its extension. But if you used the external style, then you will need to link it to the html file by using the link tag this way <link rel="stylesheet" type="text/css" href="theFile.css" >
+ 6
<style>
...........
</style>
move all the stuff that inside the style tag the file and link it with a link tag placed inside the <head> tag
<link rel="stylesheet" type="text/css" href="styleFile.css">
if you did every style on the tag itself:
<div style="color:lightblue;">....</div>
then you will need to assign classes or ids to the elements and link each in the css file
<div id="myDiv">....</div>
<div class="myDivs">....</div>
CSS:
#myDiv{
color:lightblue;
}
.myDivs{
color:green;
background-color:purple;
}
+ 4
That's explained at the beginning of CSS course.
+ 3
Thanks
+ 1
Yeah I know but how can I save it because I wrote in my html coding