Member-only story

Cracking the CSS Code: A Guide to Selectors, Properties, and Values for Beginners

Introducing basic CSS terminology

Max N
3 min readMay 28, 2023
Photo by Hannah Morgan on Unsplash

CSS Selectors: The Fashion Police of Web Design

CSS selectors are like the fashion police of web design. They’re the ones who decide which HTML elements get to wear which styles. In other words, they help you target specific elements on your web page and apply styles to them. Without selectors, your web page would be a chaotic mess of unstyled content, like a wardrobe without any organization.

For example, let’s say you want to style all the paragraphs in your web page with a fancy font and a specific color. You’d use a CSS selector like this:

p {
font-family: 'Comic Sans MS', cursive;
color: hotpink;
}

In this case, the p is the selector, and it targets all the paragraph elements on your web page. Now, all your paragraphs will be dressed to impress in Comic Sans and hot pink!

CSS Properties: The Wardrobe Essentials of Web Design

CSS properties are like the wardrobe essentials of web design. They define the specific aspects of an element’s style, such as its color, size, or position. Think of them as the individual clothing items…

--

--

Max N
Max N

Written by Max N

A writer that writes about JavaScript and Python to beginners. If you find my articles helpful, feel free to follow.

Responses (1)