Actually, tanks are best for just destroying infantry (and smaller amounts of tanks), and traveling at the speed of sound in areas without terrain. But infantry is best for everything, and you can pretty much not have any real need for tanks if you max infantry damage against tanks through research. Overall, it’s best to have both.