๐๐ฎ๐๐ถ๐ฐ๐ ๐ข๐ณ ๐๐ฆ๐ฆ
CSS styles your web pages. It handles the presentation of your site. It works with HTML and JavaScript.
CSS separates content from design. This makes your site flexible.
Web pages use three layers:
- Content: Managed by HTML.
- Presentation: Managed by CSS.
- Behavior: Managed by JavaScript.
CSS follows a strict order. The browser reads rules from top to bottom. It uses specificity to pick the final style.
You use selectors to point to elements:
- Tag selectors: Target HTML tags.
- Class selectors: Target specific groups.
- ID selectors: Target one unique item.
The Box Model is the layout engine. Every element is a box with four parts:
- Content: The text or image.
- Padding: Space between content and border.
- Border: The line around the padding.
- Margin: Space to push other elements away.
You use these tools for layout:
- Flexbox: Aligns items in one direction.
- Grid: Aligns items in rows and columns.
- Visual effects: Adds shadows and gradients.
CSS makes your site look professional.
Source: https://dev.to/yogesh_992/basics-of-css-cascading-style-sheet-746