Explain the various ways to apply CSS styles to a web page
There are three ways to apply CSS to a page.
| Way | How | Best for |
|---|---|---|
| Inline | style="color:red" attribute on one element | Quick tests |
| Internal | <style> tag in the head | One page |
| External | <link rel="stylesheet" href="style.css"> | Whole websites. Best |
<link rel="stylesheet" href="style.css">
Inline style is the strongest and external is the easiest to maintain. See CSS Inclusion.
Learn more about the similar topics:
| Tutorials |
|---|
| CSS Introduction |
| CSS Inclusion |
| CSS Syntax |
| CSS Comments |
| CSS Variables |
| List of common CSS Properties |
| Exercises & Assignments |
|---|
| No Content Found. |