I'm thinking of using a for loop, but I need to know:
That's a simplistic approach to solving the problem. I'm glad you're thinking of the direction "what do I need to know?" However, "using a for loop" is a little too deep dive to be useful. You're going to need a number of skills, including basic control structures like for loops.
How to append strings, how to interpret them, etc.
Yes, you need to spend time on how C handles strings. I would do this separate of your HTML work. Learn how to send and receive characters over serial and then append them to strings. Hint: you do *not* want to use the Arduino "String" object.
Learn how C++ handles strings. For example, == doesn't work on a string.
I would love Python's for loop right now
I'm really not sure what you mean by this. All programming languages have loop structures. That's just a basic component of the language.