Way to think in CSS or while writing css ?
Now this topic is extrememly important for you to understand. And without this, you will read and write a lot
of css but will never fully grasp how to write it properly.
- Element for which you are targeting to write css is block level element, inline element or inline-block level element. Once you determine that you will know whether margin/padding/width/height properties can be applied on a html tag or not and if it starts everytime on a new line or two html elements can sit side by side together or not. If you forgot then refresh your memory with this : Block vs inline or inline block
- If you need to align a group of elements on right or left or center of a webpage, then first you need to wrap those group of elements in a div tag and then need to use flex or grid for laying out elements in different columns.
- Once you are applying css properties on a html element, then remembering those similar properties in a group like typography properties comes handly and you can decide which one you need.