
Comment Your CodeĮven if only you will ever see your CSS, it’s still a good idea to be thorough with your comments. You may also even create sections for specific pages that may have different styling than the rest like the store or FAQs. So, a section for text styles, a section for lists and columns, a section for navigation and links, and so forth. But as a general rule, it’s a good idea to set up sections for styles as they’ll be used.

CSS code Create New Sections Where it Makes SenseĪgain, how you set up your stylesheets will largely depend on the type of site you’re working on. Typically, it’s best to place each property and value pair on a new line. Though CSS will function even if it’s visually ugly, it’s better for you and for any other developers who will be working with your code if you use plenty of line breaks to keep each code snippet separate and legible. ✨ Bookmark this for your next project! ✅ Click to Tweet Use Line Breaks Liberally CSS: the key to making your site look & function correctly. Plus, it ensures making changes, later on, is headache-free.


No matter how you choose to organize your CSS, make sure you keep your choices consistent across the entire stylesheet as well as across your entire website.įrom naming classes to line indentations to comment structures, keeping it all consistent will help you to keep track of your work more easily. Claim your 33% discount with an annual WordPress Hosting plan.
