The $1 ^3Sigma_u^- leftarrow X^3Sigma_g^-$ transition of linear HC$_5$H (A) has been observed in a neon matrix and gas phase. The assignment is based on mass-selective experiments, extrapolation of previous results of the longer HC$_{2n+1}$H homologues, and density functional and multi-state CASPT2 theoretical methods. Another band system starting at 303 nm in neon is assigned as the $1 ^1 A_1 leftarrow X ^1 A_1$ transition of the cumulene carbene pentatetraenylidene H$_2$C$_5$ (B).