Using first principles methods based on the density functional theory, the electronic structure and optical properties of Ta‐containing MXenes (Tan+1Cn, n = 1, 2, 3) are theoretically studied. The results show that the monolayer thickness has a significant effect on the optical properties of Tan+1Cn. In the infrared region (<1.6 eV), the thickest Ta4C3 monolayer with seven atomic layers has highest values of absorption coefficients, reflectivity and refraction index. In the visible region, Ta4C3 exhibits different optical characteristics as compared to Ta2C and Ta3C2 due to the different structure configuration and electron interaction. Moreover, a high transmittance over 50% is demonstrated for both Ta2C and Ta3C2, while Ta4C3 monolayer exhibits selectively transmitting feature with a low transmittance of 35% at 1.65 eV and a high transmittance of 84% at 2.25 eV, making Ta4C3 monolayer highly responsive when exposed to visible light and favorable for optical detection.