There is not an easy answer to who invented the television. The idea of having something that transmits moving images existed long before the first television was built. In the late 19th century, a couple of scientists made pivotal discoveries, without which the first television would not have existed. In the 1920s, over 50 inventors from Japan, Britain, Germany, America and Russia were all seriously attempting to build televisions, many of which had very promising demonstrations.
First Mechanical Television
If one regards the definition of “television” to be the live transmission of images with continuing variation in tone, the credit to who invented the television belongs to Scottish engineer John Logie Baird. He built and and demonstrated the world's first mechanical television. Baird also invented and demonstrated the first color television in public as well as the first electronic color television picture tube.
First Electronic Television
The credit to who invented the television as we know it today, an electronic model, was a bit of a power struggle. One inventor had the patent, but his television's design wasn't quite there yet, while the other had a fully working television but only applied for a patent later. The Russian Vladimir K. Zworykin applied for a patent for an electron scanning tube (a part that could be considered to be the “heart” of a television) in 1923 already, but could not get his television to work until 1934.
Philo Taylor Farnsworth successfully demonstrated the first television signal transmission on September 7, 1927 with his own scanning tube. A legal battle ensued in the late thirties, when RCA, the company Zworykin worked for wanted to claim the right to the patent (and the royalties). The court however ruled in favor of Fransworth, giving him patent priority and making him, officially the inventor of the first fully functional, all-electronic television.