14 Tweets 3 reads Jul 04, 2023
What is included in CSS?🎨
Here's a concise list of topics to learn CSS as a newbie!
A thread: ↓
1✦ Syntax
Syntax is the set of rules & declarations. It consists of selectors, properties, & values.
Selectors ❯ Target HTML elements
Properties ❯ Define how elements are styled
Values ❯ Specify characteristics of elements
2✦ Selectors
Selectors are used to target specific HTML elements & apply styles to them.
CSS offers many types of selectors like:
β€’ element selectors
β€’ class selectors
β€’ ID selectors
β€’ attribute selectors
β€’ pseudo-classes
β€’ pseudo-elements
3✦ Box Model
The box model defines how elements are rendered & how their dimensions are calculated.
It consists of four components:
β€’ content
β€’ padding
β€’ border
β€’ margin
Each component affects the size & spacing of the element.
4✦ Layouts
CSS provides several techniques for creating different layouts.
These techniques are:
β€’ floats β†’ allow elements to float left/right
β€’ positioning β†’ allow precise element placement
β€’ flexbox β†’ provide flexible box layouts
β€’ grid β†’ enable complex 2D layouts
5✦ Display Property
It determines how an element should be rendered on the webpage.
It controls behavior of elements as either:
β€’ block
β€’ inline
β€’ inline-block
β€’ none
Different display values affect how elements interact with other elements & flow of content on the page.
6✦ Colors & Backgrounds
CSS offers various ways to define colors & backgrounds.
Color values can be specified using:
β€’ color names
β€’ hexadecimal
β€’ RGB
β€’ RGBA
β€’ HSL
β€’ HSLA
BG properties allow you to set bg colors, images, gradients, & control positioning & repetition.
7✦ Typography
Typography refers to the styling of text on a webpage.
Properties include:
β€’ font family
β€’ size
β€’ weight
β€’ style
β€’ color
β€’ spacing
β€’ alignment.
Typography principles & CSS text properties is important for creating readable & visually appealing content.
8✦ Borders & Outlines
Border properties allow you to define border width, style, & color.
Outline properties are similar to borders but differ in that they don't take up space in the layout.
Borders & outlines are useful for adding visual distinction & emphasis to elements.
9✦ Pseudo-classes & Pseudo-elements
Pseudo-classes are used to select elements based on their state, such as:
β€’ hover
β€’ active
β€’ focus
Pseudo-elements target & style specific parts of an element, such as:
β€’ before
β€’ after
allow adding content or modify its appearance.
10✦ Transitions & Animations
They enable to add motion & dynamic effects to elements.
Transitions define smooth changes in element properties over a specified duration, such as color or size.
Animations are provided by defining key-frames & specifying animation properties.
11✦ Media Queries
Media queries help create websites that are optimized for various devices & screen sizes.
They enable responsive web design by adapting the layout & styling, based on factors like:
β€’ screen size
β€’ resolution
β€’ device orientation
12✦ Responsive Web Design
It aims to create websites that adapt & provide optimal user experiences across different devices & screen sizes.
It involves using media queries & flexible layouts to create websites that adapt to different devices & screen sizes.

Loading suggestions...