The history of libraries began thousands of years ago with the first collections of books and writings in temples and royal and private collections. Over time, libraries grew from being private collections to becoming public institutions that were open to scholars, later to all social classes. Modern libraries continue to evolve and now offer digital collections and online resources in addition to physical books and materials.