Growing up in the rural town of Higher Bockhampton in the county of Dorset, England, Hardy later drew inspiration for his work from the rurality and almost untouched antiquity of the area. The poor area of Dorset changed little during his lifetime, and Hardy was subsequently born into an area that was both poor and very rustic, according to the Poetry Foundation's biography of the poet. Many of Hardy's characters were rustic laborers and members of lower classes as a result.
Hardy's work, which often portrayed unhappy marriages or relationships, was at least partially inspired by his own allegedly unhappy marriage to Emma Lavinia Gifford. The Thomas Hardy Society's biography of the poet indicates that Hardy's marriage to Gifford, as is often the case in his writing, was one in which the couple became estranged and remained childless. He later wrote about Gifford in poetry following her death, and the poems are considered among his finest, according to the biography.
Hardy had a deep, personal interest in English architecture and history, and this fascination was often expressed in his poetry. Stonehenge, the ancient ruins site located in Southern England, was a large influence on poems such as "The Shadow on the Stone" according to the Poetry Foundation's biography of Hardy.
He was also interested in the Napoleonic Wars and went so far as to visit the field where the battle of Waterloo took place. He wrote a poetical drama entitled "The Dynasts" based on the material.
One of the more controversial aspects of Hardy's work was his religious skepticism, and this was influenced by his personal connection to Evangelical Christianity, according to George P. Landow, professor of English at Brown University, in his essay "Thomas Hardy's Religious Beliefs." Hardy's family had lifelong connections with the Church of England, and some of his poetry, most notably "The Oxen," deals with a longing for belief. Landow argues that while Hardy was a professed atheist, his fascination and history with Christianity continued to influence his work.