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

General Discussion

what to start first ?

i am on the web design track and currently done with HTML deep dive , later on i started CSS but lost track due to exams, when i returned i started introduction to programming and it interested me a lot. So i want to learn JAVASCRIPT right now.

So my question are

  1. is it okay to do Javascript before CSS ?
  2. how both relate and work together ?
  3. Does it make a difference in learning Javascript ( can css be the basics of javascript ) ?

2 Answers

Well I only have limited experience with Javascript but a lot of experience with HTML and CSS. CSS is used primarily for styling HTML documents so you could learn Javascript without CSS, but I feel its best to have a foundation in HTML and CSS initially.

The reason for that is Javascript can be used to enhance a HTML document further, to make it more dynamic. Part of that process would involve styling the HTML with CSS so its best to at least know the basics of CSS.

Just my opinion obviously, good luck with whichever path you take :)

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

HTML, CSS, and Javascript are really three flavors that make a great...cake...or something.

Anyway, HTML provides structure and meaning, saying that this thing wraps around these other things, and this bit here is a headline or an image or a link.

CSS gives that structure an appearance. Headlines have a certain size font and are bold, while links are another size and colored purple.

Javascript, meanwhile, gives power to the HTML, allowing a stateless bunch of markup to now interact with itself and outside services. Javascript can also modify CSS on the fly.

I'd say it doesn't really matter which you learn first, Javascript or CSS, but both are absolutely essential if you want to do serious work in front-end web development.