The present invention provides a composition for skin or hair which achieves an excellent UV absorption in a wide range of UV wavelength from the UV-A to the UV-B without inhibiting the effect of the alkyl ²,²-diphenylacrylate and the ±-cyano-²,²-diphenylacrylate (e.g. octocrylene) which serve to improve the photostability of dibenzoylmethane derivative. The composition for skin or hair comprises: (a) a dibenzoylmethane derivative, (b) an alkyl ²,²-diphenylacrylate and/or an ±-cyano-²,²-diphenylacrylate (e.g. octocrylene), and (c) a specific benzalmalonate derivative (e.g. di (2-ethylhexyl)-4-methoxybenzalmalonate).