We present for static density functional theory and time-dependent density functional theory calculations an all-electron method which employs high-order hierarchical finite-element bases. Our mesh generation scheme, in which structured atomic meshes are merged to an unstructured molecular mesh, allows a highly nonuniform discretization of the space. Thus it is possible to represent the core an...