Two novel dihydropyran compounds (1 and 2) containing a triphenylamine group were synthesized and characterized. The structure of compound 2 was verified by single-crystal X-ray crystallography. It crystallizes in triclinic, space group P (1) over bar with a = 6.9943(4), b = 8.1360(4), c = 23.9274(14) angstrom, alpha = 87.692(4), beta = 88.940(5), gamma = 85.223(4)degrees, V = 1355.62(13) angstrom(3), Z = 2, F(000) = 520, D-c = 1.199 Mg/m(3), M-r = 489.24 and mu = 0.075 mm(-1). The UV-vis absorption and fluorescence of the two compounds were discussed. The two compounds exhibited strong blue emissions under ultraviolet light excitation. The molecular structure and HOMO and LUMO levels of compound 2 were calculated by density functional theory (DFT) at the B3LYP/6-31 G(d) level.