He was educated at King's College School, London, and at Merton College, Oxford (B.A., 1868), and spent six years in Guernsey as senior classical master of Elizabeth College. From 1874 to 1876 he was headmaster of the Elgin Educational Institute. He began his literary career in 1875 as a critic for the Academy, and for ten years was actively engaged in journalism, becoming an important member of the staff of the Saturday Review. Some of the critical essays contributed to the literary journals were afterwards collected in his Essays in English Literature, 1780-1860 (2 vols., 1890-1895), Essays on French Novelists (1891), Miscellaneous Essays (1892), Corrected Impressions (1895).
His first book, A Primer of French Literature (1880), and his Short History of French Literature (1882; 6th ed., Oxford, 1901), were followed by a series of editions of French classics and of books and articles on the history of French literature, which made him the most prominent English authority on the subject. His studies in English literature were no less comprehensive, and included the valuable revision of Sir Walter Scott's edition of Dryden's Works (Edinburgh, 18 vols., 1882-1893), Dryden (1881) in the "English Men of Letters" series, History of Elizabethan Literature (1887), History of Nineteenth Century Literature (1896), A Short History of English Literature (1898, 3rd ed. 1903), an edition of the Minor Caroline Poets of the Caroline Period (2 vols., 1905-1906), a collection of rare poems of great value, and editions of English classics.
He edited the series of "Periods of European Literature," contributing the volumes on The Flourishing of Romance and the Rise of Allegory (1897), and The Earlier Renaissance (1901).
In 1895 he became professor of rhetoric and English literature at the university of Edinburgh, and subsequently produced two of his most important works, A History of Criticism (3 vols., 1900-1904), with the companion volume Loci Crüici, Passages Illustrative of Critical Theory and Practice (Boston, U.S.A., and London, 1903), and A History of English Prosody from the 12th Century to the Present Day (i., 1906; ii., 1908; iii., 1910); also The Later Nineteenth Century (1909).