+ 3

How can I store the formatting css in different file and make it appear in my html website

Merging Css with Html

28th Apr 2017, 8:04 AM
D4rk_v3n0m
D4rk_v3n0m - avatar
6 Réponses
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" >
30th Apr 2017, 3:53 PM
Chiaz Dothan
Chiaz Dothan - avatar
+ 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; }
28th Apr 2017, 8:32 AM
Burey
Burey - avatar
+ 4
That's explained at the beginning of CSS course.
28th Apr 2017, 8:11 AM
Chris Coder
Chris Coder - avatar
+ 3
Thanks
28th Apr 2017, 8:34 AM
D4rk_v3n0m
D4rk_v3n0m - avatar
+ 1
Yeah I know but how can I save it because I wrote in my html coding
28th Apr 2017, 8:13 AM
D4rk_v3n0m
D4rk_v3n0m - avatar