Introduction to CSS

Week 2 - Learning about Internal CSS

What is Internal CSS?

Internal CSS is defined within the <style> tags in the <head> section of an HTML document.

This allows you to define styles for the whole page without creating a separate CSS file.

Internal CSS is useful for smaller websites with a single page or when you want to apply unique styles to a single page.

CSS Colors

CSS supports various color formats: named colors, hexadecimal, RGB, and HSL.

The boxes above are styled using CSS with different background colors.

Text Styling

CSS can control text appearance, including font family, size, weight, and style.

This text uses a serif font.
This text uses a sans-serif font.
This text uses a monospace font.

Other text properties include:

The CSS Box Model

Every HTML element is treated as a box with the following properties:

This box has padding, a border, and margin applied to it.