CSS stands for Cascading Style Sheets. It controls how HTML elements look — colors, fonts, spacing, layout, and more.
Think of HTML as the structure of a house and CSS as the paint, decorations, and furniture.
Three Ways to Add CSS
- Inline — directly on the element using
styleattribute - Internal — in a
<style>tag in the head - External — in a separate
.cssfile (recommended)
Basic Syntax
A CSS rule consists of a selector and a declaration block. The selector targets the HTML element, and the declarations set its styles.
- Selector — targets the element(s) to style
- Property — what aspect to change (e.g.,
color) - Value — the setting for the property (e.g.,
blue)