Oscar Wilde was known for having a flamboyant lifestyle because he used his wit and intelligence to pursue a life of pleasure. He adopted a carefully-crafted public reputation which included an eccentric and free-spirited sense of personal style. Wilde did not share the opinion that art ought to fulfill some moral purpose, but instead felt that it should be appreciated for its own sake, for the beauty and truth it offers. Wilde came to appreciate the Aesthetic Movement, a philosophy that opposed and criticized the stringent moral codes of Victorian England. He was extravagant and outspoken. He became famous for dressing outrageously and making outrageous statements to match. Wilde seemed to revel in the kind of attention this behavior brought him, even playing to the press. He hung around with artists, traveling America and France. Several years after his marriage, he reportedly had his first affair with a man, and other liaisons followed. He was eventually put on trial as a result of these affairs because he had been indiscreet about them, and it was illegal for one man to have sex with another man in England. Wilde was sentenced to two years of hard labor, was abandoned by his former friends, had his plays closed, and was denied by publishers.