When would the tail of a comet appear to become longer?

The tail of a comet appears to become longer as the comet gets closer to the Sun. This is because comets are made up of ice, dust, and other organic compounds that are vaporized when they come closer to the intense heat and radiation of the Sun. As this material vaporizes, it creates a glowing, gaseous tail that extends away from the Sun. The closer the comet gets to the Sun, the more the ice and other volatile substances melt and vaporize, causing the tail to lengthen. Therefore, a comet's tail is typically longest when the comet is at its perihelion, which is the point in its orbit that is closest to the Sun.