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 trialDaniel Grieve
6,432 PointsJS vs CSS
Is this exercise purely for practice or is there an advantage of using JS to style links or any other element as opposed to using CSS?
1 Answer
Robert Anthony
19,952 PointsCSS describes the layout and appearance of the website when you load it but what if you want to change it for some reason. Like the user clicked on something or a timer went off or or ... JavaScript allows you to CHANGE the way the website looks or is set out and gives you more control after it has been loaded.
Daniel Grieve
6,432 PointsThanks for the reply. The exercise was to set elements within a list to the colour purple. With no further interaction, I think this was just for practice.
Steven Parker
229,744 PointsSteven Parker
229,744 PointsTo which exercise are you referring? Can you provide a link?