If you looked at the mantle in my living room you would see a stack of technical books on HTML, CSS, JavaScript, Rails and Django. I haven’t read all of them and there are only 1 or 2 that I’ve read all the way through. The most important thing I can tell you if you actually want to learn to code is to put the books down and build something you care about.
I don’t suggest trying to build your dream idea as a first project even if it’s the thing that’s going to make you a million dollars since it will be more frustrating than informative. But think of your hobbies, something that will be a funny joke for your friends, or something would actually simplify your life.
Pick something small that you care about and build it.
For me it was a small site for my recreational softball team that tracks our stats and ranks us according to the stats they talk about in the movie Moneyball. Nothing that’s going to change the world or make my name but something where I’m going to learn the process of going from zero to a real, working website.
Make sure your project encompasses a useful technical hurdle.
This is an important point that you might not fully get now but when you’re choosing your project it needs to push your boundaries of comfort. For me it was learning the template and form system in Django - fairly basic stuff but I learned more about them trying to customize them for my needs than I learned out of 50 pages of textbooks and online tutorials. Down the road a bit further I got stuck on model methods, accessing values in templates, iterating over lists in python, etc. - everything I’ve read before but only put to use when it personally mattered to me.
It won’t work properly. And that’s OK.
Because you’re pushing your comfort zone, you’re likely not going to get your project to work the way you want it to. It’s going to be time intensive and you’re going to struggle a ton trying to build it but the struggle is the learning process. Just keep in mind that the hours you spend looking at broken code and other people’s questions on stack overflow is how you learn this stuff.
We’re so used to using incredible software built by amazing engineers that our expectations are easily raised to unrealistic heights. The stuff that you build when you’re starting out isn’t going to be great. It won’t work properly. Crucial features will be missing. It will look terrible.
But the effort you put into coding your first projects is what’s going to get you good enough to build something even better.