Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. CSS Basics to Advanced

Lesson 2 of 50 · css

Adding CSS to a Page

Duration: 7 mins

There are three ways to include CSS:

  1. Inline – style attribute on an element.
  2. Embedded – <style> block inside <head>.
  3. External – <link rel="stylesheet" href="style.css">.

External CSS is the most maintainable and cache‑friendly.


Example: External Stylesheet Link

<link rel="stylesheet" href="/css/main.css" />
Previous: What is CSS?Next: Basic Selectors