Can I link multiple html files to a single stylesheet?

Can I link multiple html files to a single style-sheet? Will there be any side effects?

Its is ok to do, but if you change anything in the stylesheet all your html files connected to it will also change their styles.

Yes, you can do so but if you change anything in the .css file it’s gonna affect all the .html linked to it.
i suggest you create different .css files if you will be using different designs for your html pages or else you’ll have to edit your styles with inline/internal css

@brjsh20 As @anon38330656 and @iHassan-NG mentioned above; if you link a css file to multiple html files, all the html files’ styles will change if you change the css file. It is really helpful to use if you are designing webpages which share class names, ids and styles like News Sites (eg: Freecodecamp news).

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.