Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website Customizing Colors and Fonts Organize CSS with Comments

narvesh pradhan
narvesh pradhan
2,958 Points

css??

is it necessary to keep the css code step by step??

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

In the stylesheet, no it's not always necessary, but HIGHLY recommended because of the "Cascading" part of CSS and for ease of readability.
If you just throw the styling in any order, it may work, or some styles may inadvertently override the original and intended ones.

Also, if you wanted to change something weeks or months down the line, it would be very inconvenient and time consuming if there was no 'order' to your stylesheet.

So, I guess the best answer is no... but YES. :)

narvesh pradhan
narvesh pradhan
2,958 Points

i get little bit confuse to write comt and which is the exact suitable palce to comt?? what should i do for that??

Jason Anders
Jason Anders
Treehouse Moderator 145,858 Points

I personally don't do a lot of commenting (not nearly as much as they do in the video).

Think of comments as a filing system in a file-cabinet.

All your 'nav' styles together with a title comment /NAV/ All your 'images' ... All you 'links' ... etc.

I know I need to start commenting more... small stylesheets really have no need, but large and complex one kind of do.

You just do what you feel is good for you, but always think "Will someone else understand this if they needed to work with it."

jason chan
jason chan
31,009 Points

yes, it's always in the

<head></head>

You can right click on the browser and check out other websites source code.