CSSCSS · Lesson 1 of 9
Linking CSS & Setup
CSS is written separately from HTML (usually) and linked in. This is the separation of concerns principle: HTML handles structure, CSS handles appearance.
There are three ways to add CSS to HTML. The external stylesheet (in a separate .css file, linked with <link>) is the best practice. The others exist but have specific, limited use cases.
◆ Note
Browser DevTools are your best friend for CSS. In Chrome or Firefox: right-click any element → Inspect. You can live-edit CSS properties in the Styles panel to see changes instantly, then copy them to your file.
Browser DevTools are your best friend for CSS. In Chrome or Firefox: right-click any element → Inspect. You can live-edit CSS properties in the Styles panel to see changes instantly, then copy them to your file.