The Best Resources for Learning to Code Online

From JavaScript to programming for mobile, these resources have you covered

Serkan Ismail/EyeEm/Getty Images

Whether you want to build your own website or you're hoping to boost your attractiveness to potential employers, learning to code can certainly be handy. But where to start? There's clearly no shortage of options for getting your feet wet in the world of programing languages, but finding a good entry point can prove to be daunting. After all, how do you even decide which language makes the most sense for you?

This article will attempt to walk you through the first decisions you'll need to make when you're contemplating learning to code, and then it will recommend some of the best online resources to turn to when you're ready to develop your skills.

01
of 08

First Things First: Decide which programming language you want to learn

Carl Cheo

Type "which coding language to learn" into Google, and you'll be met with well over 3 million search results. Clearly, this is a popular question, and you'll find plenty of authorities with different opinions on the subject. It could be illuminating and worthwhile for you to spend some time reading what various sites have to say on this topic, but if you want to streamline things a bit, first ask yourself this question: What do I want to build?

Just like words in the English language are the means to the end of communicating thoughts and ideas, programming languages are useful because they help you accomplish certain things. So when you're deciding what coding language to learn, it's incredibly important to think about what you want to build. 

Want to build a website? Knowing HTML, CSS and Javascript will be important for you. More interested in building a smartphone app? You'll need to decide which platform you want to start with (Android or iOS), and then pick one of the corresponding languages such as Java and Objective-C. 

Clearly, the above examples are not exhaustive; they just provide a taste of the questions you'll want to ask yourself when you're considering which language you should start with. The flow chart above could prove to be another helpful resource when you're trying to narrow your coding pursuit down to a language. And never underestimate the usefulness of Google; it will take some patience, but if you know what you want to build, researching what coding language it takes to build it can be well worth the time and patience.

Carl Cheo, who's behind that nifty flowchart seen above, also provides a handy breakdown of learning resources to consider based on the language you're looking to learn. View it here — note that you can click on the different tabs to learn more about resources for different languages.

02
of 08
Codeacademy

Best for: Free, dare I say fun coding lessons for some of the more basic languages. If you want to build a website, you can even take a course focused on the fundamentals of HTML and CSS, which you'll put to use as you practice building a site.

Languages offered: 

  • HTML & CSS
  • JavaScript
  • Python
  • Ruby
  • PHP
  • SQL
  • Sass

Pros: Once you've created a Codeacademy account and begin taking a course, the service keeps track of your progress, so it's easy to stop and start without needing to spend hours tracking down where you left off. Another plus is that this service is targeted toward total beginners; it recommends complete newbies start with HTML and CSS, though it offers more advanced language courses as well. You can browse by course type (web development, tools, APIs, data analytics and more), and thanks to the site's huge popularity — it boasts more than 20 million users — its forums are a great resource for asking and answering your own questions on anything from problems within a specific course to how to build what your heart desires. Another pro: Codeacademy is free.

Cons: Some courses (or particular questions or problems within a course) aren't written perfectly clearly, which can lead to confusion on behalf of the user. The robust Codeacademy forums can usually come to the rescue in these instances, though it can be discouraging to run upon a snag when most of the content is presented so seamlessly. More »

Code Avengers

Best for: Those who want fun and games along the way to learning how to build real things through coding languages, since you'll complete mini games after each lesson. Like Codeacademy, it's targeted toward beginners, and perhaps even more than Codeacademy, it's about learning basic concepts rather than all the nuts and bolts of a programming language. It's also an ideal choice for those who speak languages other than English, since courses are also offered in Spanish, Dutch, Portuguese and Russian, among other languages.

Languages offered: 

  • HMTL & CSS
  • JavaScript
  • Python

Pros: Courses through Code Avengers are fun and engaging — in this respect, it's comparable and even competitive with Codeacademy.

Cons: The biggest one is that there's a cost; while you can get a free trial, subscriptions — which give you full access to each course, rather than a limit of up to just five lessons in a course — cost $29 per month or $120 for six months. Another disadvantage, at least compared to Codeacademy, is that there aren't any forums specific to individual courses, so it's harder to track down solutions if you're struggling with a certain problem within your course. Compared to some other sites, you also have relatively few language options to study. More »

Khan Academy

Best for: Newbies who know what they want to build and want an engaging, straightforward way to learn skills. Additionally, Khan Academy will make the most sense for those who want to focus on graphics and gaming-type applications. There's also a focus on programming drawings and animations.

Languages offered:

  • JavaScript
  •  SQL

Pros: Everything is free, making Khan Academy one of the great resources for learning to code online without having to hand over credit card information. Lessons are reasonably sized (not hours-long) and engaging. The way new skills are presented and taught is also well-organized; you can jump to animation basics within the JavaScript materials, for instance.

Cons: Relatively few languages offered, and you won't enjoy the same thriving forum community as available with Codeacademy. That may or may not make a difference depending on your learning style and preferences — it's just something to keep in mind. More »

05
of 08
Code School

Best for: Those who want to learn languages beyond the standard JavaScript and HTML/CSS, especially mobile languages for iOS apps such as Objective-C. It's not as beginner-oriented as the other resources on this list, so you might want to start with another site first and then make your way here after you have a few skills under your belt. Code School has more of a professional bent than many of the other resources mentioned in this article — if you're looking to become a programmer by trade, this could be a good place to spend some serious time (though be prepared to spend some money as well if you want access to all the material).

Languages offered:

  • HTML & CSS
  • JavaScript
  • Ruby
  • Ruby on Rails
  • PHP
  • Python
  • Objective-C
  • Swift

Pros: A great selection of courses, and a very helpful beginners guide that can inform your decision of which language to begin with. In line with its reputation for providing professional-quality courses, Code School offers professionally curated content lists, along with podcasts and video shows. You can dip your toes into the world of coding for iOS devices — something that isn't possible to do with most of the other resources mentioned in this list.

Cons: You might feel a bit lost if you come to Code School with zero prior programming knowledge. Plus, to get unlimited access to all the site's 71 courses and 254 screencasts, you'll need to pay ($29 a month or $19 a month with a yearly plan) — and if you want to use this site to its full potential you'll need to shell out. More »

06
of 08
Coursera

Best for: Self-motivated learners who have the dedication and the patience to do a bit of digging to find the course that makes the most sense for them, since unlike sites like Codeacademy, Coursera hosts educational material for a huge variety of subjects beyond programming. 

Languages offered:

  • HTML & CSS
  • JavaScript
  • Python
  • Ruby
  • Objective-C
  • Swift
  • You'll find additional languages based on your search terms, since Coursera is a repository for educational material on a wide variety of subjects

Pros: Courses are available from world-renowned institutions such as Johns Hopkins University, Stanford and the University of Michigan, so you know you're in good hands. Plus, most courses are free, though you can pay for some, including options that present you a certificate of completion at the end.

Cons: You won't find all the coding lessons in one easy-to-digest place, meaning it could help to come to this site knowing exactly what you're looking for. The courses generally aren't as engaging or interactive as those available through Codeacademy, Code Avengers or Khan Academy, either. More »

07
of 08
Treehouse

Best for: Those who are planning to stick with programming and utilize the skills they learn professionally or for some side projects, since most material requires a paid subscription. That's not to say you need to come to Treehouse with a ton of prior knowledge; having an idea of what you want to build is often enough, since many of the courses are built around objectives, such as building a website.

Languages offered: 

  • HTML & CSS
  • JavaScript
  • jQuery
  • Ruby
  • Ruby on Rails
  • PHP,
  • Swift
  • Objective-C
  • C#

Pros: Includes mobile programming languages for iOS, so if you want to build an iPhone app, this site could help you learn how to do it. You get access to community forums, which can further your learning and passion for coding in addition to helping you when you're stuck.

Cons: Once you've used up the free trial, Treehouse requires you to select one of two paid plans. The cheaper one costs $25 per month and gives you access to more than 1,000 video courses and interactive tools, while for $49 a month the "Pro Plan" gets you access to a members-only forum, bonus content, the ability to download videos for offline learning and more. Some of those features could definitely be useful, but you'll need to be pretty serious about learning to code for it to be worth paying that much on a monthly basis. More »

08
of 08

Programming for Kids

Swift Playgrounds. Apple

All the above sites are geared toward beginners, but what about newbies of a tender age? You'll want to check out one of these sites geared toward children. Options include Blockly, Scratch and SwiftPlayground, and they introduce young ones to programming concepts in engaging, easy-to-follow ways with an emphasis on visuals.

Start Free, and Have Fun

When it comes to learning how to code, take advantage of the internet's wealth of free resources to explore your options and expose yourself to as many learning methods and skills as possible. There's really no need to whip out your credit card until you're certain you can't acquire certain knowledge any other way, and/or if you've decided you want to pursue programming professionally. But at that point, you might want to consider transferring to an in-person classroom anyway!