Fireworks are a class of low explosive pyrotechnic devices used for aesthetic and entertainment purposes. The most common use of a firework is as part of a fireworks display. A fireworks event (also called a fireworks show or pyrotechnics) is a display of the effects produced by firework devices. Fireworks competitions are also regularly held at a number of places. Fireworks (devices) take many forms to produce the four primary effects: noise, light, smoke, and floating materials (confetti  for example). They may be designed to burn with colored flames and sparks including red, orange, yellow, green, blue, purple, and silver. Displays are common throughout the world and are the focal point of many cultural and religious celebrations.
Fireworks were invented in ancient China in the 12th century to scare away evil spirits, as a natural extension of the Chinese invention of gunpowder. Such important events and festivities as Chinese New Year and the Mid-Autumn Moon Festival were and still are times when fireworks are guaranteed sights. China is the largest manufacturer and exporter of fireworks in the world.
Fireworks are generally classified as to where they perform, either as a ground or aerial firework. In the latter case they may provide their own propulsion (skyrocket) or be shot into the air by a mortar (aerial shell).
The most common feature of fireworks is a paper or pasteboard tube or casing filled with the combustible material, often pyrotechnic stars. A number of these tubes or cases are often combined so as to make, when kindled, a great variety of sparkling shapes, often variously colored. The skyrocket is a common form of firework, although the first skyrockets were used in war. The aerial shell, however, is the backbone of today's commercial aerial display, and a smaller version for consumer use is known as the festival ball in the United States. Such rocket technology has also been used for the delivery of mail by rocket and is used as propulsion for most model rockets.
The earliest documentation of fireworks dates back to 7th century China where they were first used to frighten away evil spirits with their loud sound (??/?? bi?n pào) and to pray for happiness and prosperity.
Eventually the art and science of firework making developed into an independent profession. In ancient China, pyrotechnicians (firework-masters) were respected for their knowledge and skill in mounting dazzling displays of light and sound. A record in 1264 states that the speed of the rocket-propelled 'ground-rat' firework frightened the Empress Dowager Gong Sheng during a feast held in her honor by her son Emperor Lizong of Song (r. 1224–1264).[1] By the 14th century rocket propulsion was common in warfare, as evidenced by the Huolongjing compiled by Liu Ji (1311–1375) and Jiao Yu (fl. c. 1350–1412).[2]
However, in China, fireworks for ceremonies and celebrations were mostly for royalties and the rich before the 14th century. It was only in the Ming Dynasty that any event for common people — a birth, a wedding, a business opening, or a New Year's Eve celebration — became a fitting occasion for fireworks and other noisemakers.
Amédée-François Frézier published a "Treatise on Fireworks" in 1706, covering the recreational and ceremonial uses of fireworks, rather than their military uses. The book became a standard text for fireworks makers.
Music for the Royal Fireworks was composed by George Frideric Handel in 1749 to celebrate the peace Treaty of Aix-la-Chapelle, which had been declared the previous year.
Improper use of fireworks may be dangerous, both to the person operating them (risks of burns and wounds) and to bystanders; in addition, they may start fires after landing on flammable  material. For this reason, the use of fireworks is generally legally restricted. Display fireworks are restricted by law for use by professionals; consumer items, available to the public, are smaller versions containing limited amounts of explosive material to reduce potential danger.
Fireworks are also a problem for animals, both domestic and wild, who can be terrified by their noise, leading to them running away, often into danger, or hurting themselves on fences or in other ways in an attempt to escape.
Data from [u][/u]