A jib is a triangular sail that sets ahead of the foremast of a sailing vessel. Its tack (lower leading edge) is attached to the bowsprit, to the bow, or to the deck between the bowsprit and the foremost mast. Jibs and spinnakers are the two main types of headsails on a modern boat.