Can you learn to play the piano by using a keyboard?

Of course! A keyboard is just a little smaller, but the concept is the same!

You can for the first year or two, but after that, save yourself some frustration and invest in a real piano. The keys of a piano feel and play a little differently, but there is no difference between the two in the way you would learn to play.

learnpiano.bigty.me/learn-to-play-piano-simple-steps/

This site has many piano lessons and online piano lessons reviews, you can take a look.