HTMLHTML14 min read

HTML CSS

Connect a CSS file to HTML and understand why CSS is separate from HTML.

David Miller
December 31, 2025
0.0k0

CSS styles your HTML. HTML should focus on structure, CSS on design. ## Link CSS file Create `styles.css` and link it in head: ```html <head> <link rel="stylesheet" href="styles.css" /> </head> ``` ## Example CSS (styles.css) ```css h1 { color: darkblue; } p { font-size: 18px; } ``` ## Preview Your heading becomes dark blue, paragraph becomes bigger. ## Why separate file is better - easy to manage - same CSS can style multiple pages

#HTML#Beginner