When you first start to learn to code and how to build your first website you are going to feel lost and wonder why you can't remember anything from one step to another. It's okay though; you're not alone. Everyone who steps onto the road of learning tech goes through the same challenge. Just remember that you are new to this and there is a lot to remember. Like anything new, there is a learning curve, and you are going to feel confused. Just because you are new to the process, doesn't mean you're alone. Even the most seasoned techies will tell you that they can get confused with new technologies too.
Confusion can be daunting. The lack of clarity and upheaval when learning a new function can even be overwhelming. It also means that you are challenging yourself to find a way through the maze of new information and will come out with the solutions and a knowledge base that will get you on the road of coding brilliance.
Whether you are new to technology or learning a new functionality within the process, you will have a period of adjustment that is going to be uncomfortable. Again, this is okay. Making mistakes is part of life and code, and until you become more familiar with the whys and hows of how something works, it is going to feel a little strange. This is all part of the process that is critical to making the technology work. Spend some time reading code, even if you're not totally familiar with it, and try to figure it out. Inspect some web pages and see what was used for different sections. Nothing is set in stone until you say it is, and even then, it can be reviewed, revised and updated.
If you start feeling really frustrated, take a step back, take a deep breath and relax. You may need to step away entirely and come back to your work with fresh eyes to see what you were missing, and that is okay too. Take your time. You're still learning!
Remember how I said that you're not alone? Well, you aren't alone. Draw on the knowledge of others as well as the internet. Network with fellow students or coworkers for solutions and if you need to, Google it. There are tons of reference materials out on the web, and a simple Google query could take you to the exact answer you need.
Developing good habits when learning to code will help you along the way. Train your eye to look for those often repeated errors and how to fix them. I personally keep a Lessons Learned List where I keep notes of issues that have caused me my biggest mistakes, and time to fix them, while learning to code. It's been a great reference tool for me to go back to when I'm working. Also, keep any reference materials handy and bookmark helpful websites for review and assistance in getting you where you need to be in your code.
But above all, have fun with it!