VLANs can be configured at the port group level. The ESXi host provides VLAN support through virtual switch tagging, which is provided by giving a port group a VLAN ID (by default, a VLAN ID is optional). The VMkernel then takes care of all tagging and untagging as the packets pass through the virtual switch.
I’ve created this white boarding session on my new Sketch Design Tablet which came with an awesome sketching tool called Artweaver.