After the advances in strong infrared laser sources and high harmonic generation techniques, the measurement of attosecond dynamics of excited states in molecules has become a reality in many laboratories around the world. The interpretation of these novel ultrafast experiments, aiming at increasingly large molecules, poses considerable theoretical and computational challenges that can be tackled in the framework of time-dependent density functional theory (TDDFT). In this chapter we survey the basics of TDDFT in its real-time and real-space implementation, with particular emphasis on its advantages and limitations in the description of attosecond dynamics. The applicability of this approach to simulate time-resolved absorption and photoelectron spectroscopies is covered in detail.