VLAN Frame tagging is used to identify the VLAN that a frame belongs to as it traverses across the VLANs (switch fabric). The VLAN Frame tag is placed on the Ethernet frame when the Ethernet frame reaches a switch from an access port that is a member of VLAN. If the destination VLAN is not directly connected to the switch on which the the frame has originated, then the switch forwards the frame across its VLAN trunk port (assuming that a trunk port available, else the frame will not be forwarded). On the receiving end of the trunk port, if the switch has the destination VLAN directly connected to it, then the switch removes the VLAN identifier and the VLAN membership information and forwards it to the access port. Note that VLAN information is transparent to the end devices (say, user computer, printer, etc.).
There are different VLAN frame trunking technologies available.
Inter-Switch Link (ISL): Cisco proprietary VLAN frame tagging and appears that the support has been discontinued. No much support from other vendors.
IEEE 802.1Q: IEEE industry standard VLAN frame tagging.
LAN Emulation (LANE): LANE is used to communicate with multiple VLANs over ATM.
802.10 (FDDI): Protocol for sending VLAN information over FDDI.
IEEE 802.1q is a standard developed by the Institute of Electrical and Electronics Engineers (IEEE) to carry traffic belonging to multiple VLANs across a trunk. In contrast to ISL, 802.1Q does not actually encapsulate the original frame. Instead, it adds a 32-bit field between the source MAC address and the Ether Type/Length fields of the original frame. This 32-bit field carries the information used to deterministically identify the VLAN the Ethernet frame belongs to.
The extra VLAN header used by both ISL and 802.1Q uses the VLAN identifier or VLAN ID field to identify the VLAN the frame belongs to. VLAN ID is a 12-bit field specifying the VLAN to which the frame belongs. The range of hexadecimal values is from 0x000 to 0xFFF for a 12-bit number. The hexadecimal values of 0x000 and 0xFFF are reserved while all other values in the range can be used as VLAN identifiers, allowing up to 4,094 VLANs. Please see the graphic to understand how IEEE 802.1Q tag is inserted in a regular Ethernet frame.
Please see the below fig. to understand how IEEE 802.1Q tag is inserted in a regular Ethernet frame.