Although we had artificial light for centuries, as late as 19th century there still were no ideas for illumination of greater areas: streets, public places, factories, even of rooms in houses. There were tries to illuminate the streets as early as 15th century. Mayor of London, Sir Henry Barton, passed a law in 1417 that ordered that citizens must hang lamps with light when night falls in the winter and leave them there until the morning. Paris had a similar law from 1524 that ordered that all houses that had street side must have a light in the window so the people could see at night. Same laws were repeated in intervals to remind people but there was no permanent solution. That kind of light was also not sufficient. It was weak and irregular. The solution was hiding in the ground for thousands of years and 140 years more after it was first discovered.
Paper by Thomas Shirley, written in 1667, details about flammability of a coal gas that is found in coalmines. In 1790, while an employee in Soho Foundry, William Murdoch began experimenting with flammable gases to see which would be the best to use as a fuel for lamps. Coal gas, which he got from distillation of coal, proved to be the best because it gave the brightest flame. As a first practical experiment, he chose his own house and in 1792, he lit it with coal gas. This case is considered for a first commercial use of gas for purpose of lightning in history. Few years after that, in 1798, he illuminated the main building of Soho Foundry and in 1802 he lit the front side of the building as a public presentation which astounded audience. In 1801, Philip Lebon of Paris lit his house with gas. In 1807 in London, Pall Mall is the first street to get gaslight while Paris gets them in 1820. Gas was transported through pipes to the gas lamps and lamps were placed on the posts. Lamplighters were workers who cared about them, lit them in the evening and put them out in the morning. After Europe gas lamps spread to America. Baltimore was a first city in the United States that got gas light in 1816 and the first city that had gas streetlights. By the beginning of 20th century, most of the cities in the Europe and America had streets illuminated by gas lamps. It remained like that until the advent of the electricity. Now, gaslights can be seen at places that wish to keep historical authenticity. Modern gas lamps are now used for camping.
Even though gas light was a step in the right direction for public and house illumination (for instance - crime rates began to drop after placement of streetlights) it had its bad sides. There were no laws to regulate firms that made and maintained infrastructure, which resulted in leaking pipes, low pressure, suffocations, fires and explosions. Despite all that it still remained fairly popular until electricity came to replace it.