DEV Community

Cover image for 5 tips for learning CSS in 2021
Lenin Felix
Lenin Felix

Posted on • Updated on

5 tips for learning CSS in 2021

promo

**CSS is a language that can be complicated (at least at the beginning), it may not be very clear and sometimes a bit weird the way some things are written (I felt that at the beginning) but the following tips will help you to get to know it and master it.

Selectors

Identify the different selectors you can use to style your HTML. At least focus (in the beginning) on the most basic ones like tags selectors and selectors by id and class (believe me it will be a lot of fun to fill all your html with just id and classes).

Alt Text

Anatomy

Knows the anatomy of its declaration, that is to say, the base structure with which it must be written. Understand how the selectors are named with their respective patterns or structure, know what the properties and their values are.

Alt Text

Box Model

Understand what the box model is and what properties affect its sizing. Understanding the box model will expand your mind and you will be able to see and understand perfectly how certain properties act in such a way and how it can be affected if you change or add another property (such as box-sizing).

Alt Text

Positioning

Master how elements are positioned. Using positioning absolute, relative, Flexbox and CSS Grid. Understanding the positioning will help you to see how all the elements that you style have an order and roughly meet certain patterns, which you can break if you know how to use their positions (CSS Grid for example), in short you will know how your html elements are distributed in order to give a more beautiful and friendly to the eye (and not all as a word with pure Arial 12).

Alt Text

Practice

**Practice and perseverance are fundamental in your learning process. Try to copy what others do, that helps a lot to see how others think, it is also highly recommended that you play a lot, that by yourself try to do and remember how to do it, that exponentially increases your knowledge because it just came out of you.

Alt Text


If you liked the content you can support me in:

ko-fi


Want to earn free Bitcoins and Dogecoins? Click on the banner!

promo

Top comments (1)

Collapse
 
aalphaindia profile image
Pawan Pawar

Indeed a nice post!