← font came from
CSS stands for Cascading Style Sheets. It is the standard language used to design, style, and lay out web pages created with HTML.
While HTML defines the structure and content of a webpage (text, images, buttons), CSS controls the presentation (colors, fonts, spacing, layout, and animations).
A CSS rule consists of a selector and a declaration block:
/* Selector targeting all <h1> elements */
h1 {
color: #2563eb; /* Property: Value; */
font-size: 32px;
text-align: center;
}
h1, .button, #header).color, margin, font-size).red, 16px, center).There are three ways to apply CSS:
html
<link rel="stylesheet" href="styles.css"><style> tag in the <head> of an HTML document.3. **Inline CSS:** Applied directly inside an HTML tag (used sparingly).html
This is blue text.
```
Margin: Space outside the border, separating the element from others.
CSS Grid (2D): Perfect for complex, two-dimensional grid layouts (entire page structures, galleries).
Responsive Design: Using Media Queries to adapt layouts for mobile, tablet, and desktop screens:
css
@media (max-width: 768px) {
.sidebar {
display: none; /* Hide sidebar on mobile */
}
}
Words that led here