Both descriptions appear because the piano has strings that are struck by hammers. In organology it is a struck-string keyboard instrument and belongs to the chordophone family; in orchestral discussion it is also frequently grouped with percussion because its strings are sounded by impact. The answer depends on the classification system being used.
A Reliable Short History of the Piano
Bartolomeo Cristofori, an Italian maker employed by the Medici court, developed early hammer-action keyboard instruments around 1700. His key achievement was an escapement action: the hammer could strike the string and move away quickly, allowing the string to vibrate and the note to be repeated.
Only a small number of Cristofori instruments survive. Through the 18th and 19th centuries, makers across Europe developed different actions, stronger frames, improved soundboards, pedals, cross-stringing, felt hammers, and greater string tension. These changes increased volume, sustain, reliability, and tonal range.
The modern piano did not result from one later inventor or one sudden upgrade. Viennese and English action traditions, the double-escapement work associated with Sébastien Érard, iron framing, industrial manufacturing, and many makers’ refinements all contributed.

