Learn CSS: What is CSS | Inline, Internal and External CSS in CSS

5 months ago
11

CSS can change the appearance of many things on your webpage, like:

The fonts used for text
The colors of text and backgrounds
The size and spacing of elements
The borders and shadows around elements
And much more!
Inline, Internal, and External CSS
There are three main ways to use CSS:

1. Inline CSS:

Imagine writing instructions for your designer directly onto the walls of your house. That's kind of like inline CSS. You add the CSS code directly to the HTML code of your webpage, like this:
2. Internal CSS:

Imagine writing your instructions for your designer on a separate sheet of paper, but still keeping it inside the house. That's kind of like internal CSS. You add the CSS code to the <head> section of your HTML document, like this:
3. External CSS:

Imagine writing your instructions for your designer on a separate sheet of paper and giving it to them outside the house. That's kind of like external CSS. You add the CSS code to a separate file, like style.css, and then link to that file from your HTML document, like this:

Loading comments...