FLANGES GENERAL
A flange is a method of connecting pipes, valves, pumps and other equipment to form a pipingsystem. It also provides easy access for cleaning, inspection or modification. Flanges are usuallywelded or screwed. Flanged joints are made by bolting together two flanges with a gasket betweenthem to provide a seal.Pipe flanges are manufactured in all the different materials. Some flanges are made of cast and ductileiron, but the most used material is forged carbon steel and have machined surfaces.
TYPES OF FLANGES
The most used flange types in Petro and chemical industry are: 
Welding Neck Flange
Slip On Flange
Socket Weld Flange
Lap Joint Flange
Threaded Flange

Blind FlangeAll types except the Lap Joint flange are provided with a raised flange face.
SPECIAL FLANGES
Except the flanges, which are mentioned above, there are still a number of special flanges such as:

Orifice Flanges
Spectacle Blinds (part of flange connection)
Spades and Ring Spacers (part of flange connection)
Long Welding Neck Flanges
Weldoflange / Nipoflange
Expander Flange
Reducing Flange

A flange is basically an extension of a structure and usually has holes drilled into it. These holes are placed in the flange to accommodate securing bolts. The flange seals or joins the various parts of the structure.
Please view the main elements of flange as below:
Dimensions of Flanges
8 Boltholes/ Welding bevel 37.5 (red circle)
8 Boltholes/ Welding bevel 37.5o (red circle)
Each flange ASME B16.5 has a number of standard dimensions. If a draftsman in Japan or a work preparer in Canada or a pipefitter in Australia is speaking about a Welding Neck flange 6″-150#-S40 ASME B16.5, then it goes over the flange which in the image here on the left is shown.
If the flange is ordered, the supplier want to know the material quality. For example ASTM A105 is a forged carbon steel flange, while A182 is a forged stainless steel flange.
So, in a correct order to a supplier two standards must be specified:
Welding Neck flange 6″-150#-S40-ASME B16.5 / ASTM A105.
Function
The purpose of a flange depends on its design. It can be to increase the strength of a structure, such as in the case of an iron beam. These are often used in the construction of houses and buildings. A flange can also be used as a guide for keeping a particular object in place. This is most commonly seen in train wheels, which have flanges on either side to prevent the wheels from changing directions. The most common use of a flange is to help attach objects, such as in pipes. Through the use of these items, the pipes can easily be assembled or disassembled.
Materials
The usual materials of flanges include stainless steel, carbon steel, aluminum and plastic. The choice of the material largely depends on the purpose of the flange. For example, stainless steel is more durable and is necessary for heavy use. On the other hand, plastic is more feasible for use in the home because of its reasonable price and easy installation. The materials used for flanges are under the designation of the American Society of Mechanical Engineers.
Faces
The face of a flange is usually designed to be a tongue and groove, which is a means of attaching two flat pieces to make one single surface. Another example of the design of a flange is the ring joint. This type of flange covers the entire face and includes the internal and external portions of the bolts. Another common face of the flange is the raised face, wherein a part of the face of the flange is elevated around it to seal the flat gasket.
Designs
One of the most common designs of a flange is the welding neck, which is meant to be used in welding a pipe or tubing. Another example is the blind flange. This type is designed to have no opening in the center and is used to close off or seal a connection. A threaded flange has an internal or external thread opposite to its ring groove. Its purpose is to match with a standard threaded pipe.
Standard
Flanges usually follow standards set within the country they are applied, such as those set by the American National Standards Institution (ANSI) and the American Petroleum Institute (API). These standards make the dimensions of the flanges uniform so they can be interchangeable. However, a flange that follows the ANSI or API may not fit into the standards that are followed abroad.