← All tutorials

GoCareerGo Tutorials

CSS Tutorial

Selectors, box model, Flexbox, Grid, animation and responsive design.

Ways to Add CSS

Three ways to attach styles to HTML — each with different scope and reusability trade-offs.

  • Inline — style="..." directly on an element. Highest specificity, hardest to maintain
  • Internal — a <style> block in the <head>. Fine for a single page
  • External — a linked .css file. Best for reuse and caching across pages
<link rel="stylesheet" href="/styles.css" />