What is code style mean.?🤷‍♀

Code style mean write, proper readable, extensible code, and follow the standerd rules given by the company or creator, in programming we should follow the rules which makes programming perfect for ourself. but the reason of our lack of knowladge, we avoid these rules and become bad programmer.

I will demonstrate you step by step, how to write perfect CSS code.


Give proper name to identifires. Don’t use a cipher or name the class for the style. Try to come up with a name that explain the purpose of the class.

Make the class name short as possible, but still easy to understand.
Try to explain what exactly this element is going to do.
This way of doing code make your code readable and efficient.

Except when its unavoidable, don’t use element name with class name of identifires.

Measuring units:
Dont define measuring units with zero value, if there is no good reason.

Dont use frection from -1 to 1 with zero.

If the URL contains, spection char like pranthisis single quote double quote, white space, so then we should need to use quotes, other than no other need to use quotes.

Most importent don’t use anything dashed — as seprator in class names.

As in HTML, always use two space indentation for child element.

Decelare properties in alphabetical order.

Always use new line for selector or decleration.

This is an obvious yet very important rule: always leave a blank line between the rules.


Code style in any programming language is very importent, obvious yet there are syntext rules to write code, but its not enough to make better readable code, there for there are some tips to follow and become master to writing code. “If your code understand by others its mean you are better programmer”.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Toseef Ahmad

Toseef Ahmad

Hy, i'm ReactJS Front End Developer And CYBER SECURITY Export. i love Computer Science!