The digital piano is still a piano, which means that its sound will be more reminiscent of the actual sound of the traditional piano. The keyboard is a bit different because the sounds can be changed depending on what you think will fit the song that you want to play. Digital pianos and the electronic keyboard is the same when it comes to needing electricity to be played.
They also do not have to be tuned to work. If you would like to learn how to play the piano and its underlying music details, it is best that you will still learn with a digital piano. The electronic keyboard is the better choice if you already know how to play.