The Wikipedia article USB hardware states:
- The type-A plug. This plug has an elongated rectangular cross-section, inserts into a type-A receptacle on a downstream port on a USB host or hub, and carries both power and data. Captive cables on USB devices, such as keyboards or mice, terminate with a type-A plug.
- The type-B plug: This plug has a near square cross-section with the top exterior corners beveled and inserts into a type-B receptacle on an upstream port on a USB device, such as a printer. On some devices, the type-B receptacle has no data connections, being used solely for accepting power from the upstream device. This two-connector-type scheme (A/B) prevents a user from accidentally creating a loop.