Is it good idea to make separate CSS file for each HTML page? -
i building personal homepage. have 4 html pages , 1 css sheet linked of pages. is, inside single css file have set layout different pages. [in fact, each page has pretty same layout, contents , style looks different. , website isnt advance.]
is practice? or should create separate css each page?
an example of have done:
page-1.html:
<link rel="stylesheet" type="text/css" href="design.css">
page-2.html:
<link rel="stylesheet" type="text/css" href="design.css">
design.css:
/* ....... */
your example shows using 1 design.css
file entire website.
generally, better have 1 single .css file containing data pages 2 reasons:
- you allow browsers cache .css files resulting in faster loading times;
- it ease maintenance process.
i advise you, if want divide .css in separate blocks use css' @import
divide blocks of code f.e form styles , on.
Comments
Post a Comment