A lighthouse is a tower, building, or other type of structure designed to contain a flashing light to warn of hazards or to aid navigation primarily at night. The lights now flash on and off in a predetermined sequence to identify which light they are. Lighthouses are used as an aid to nighttime or fog-bound navigation for ship pilots and Captains at sea or on inland waterways. They warn of dangerous coastlines, points of land, hazardous shoals, rocks and reefs, or mark ship channels or harbor entrances. Under clear weather a light can be seen at night about . Now in areas of fog the lights are typically combined with a foghorn. Before foghorns were developed cannons and/or large bells (rung by clockworks) were used to warn of fog shrouded hazards. The flashing lights are usually mounted on towers or other prominent structures built on points of land, rocks or shoals near the sea. Some are built on pilings, caissons or mounted on isolated rocks. Some lighthouses are mounted on anchored Lightships when no other economical alternative exists.