P Doors are Warp Doors that can only be entered when a P Switch is active. These Warp Doors made their first appearance in Super Mario Bros. 3, but with a different appearance from its current one.
A P Door first appears in Super Mario Bros. 3 in the second fortress of Giant Land. This P Door is invisible, and an outline of Blue Coins will show where to enter when the P Switch is pressed. P Doors also appeared in later fortresses including World 7-Fortress 1 and World 8-Fortress, this time in visible form, represented as a white rectangular doorway.
Super Mario Maker / Super Mario Maker for Nintendo 3DS[edit]
An inactive P Door in Super Mario Maker
In Super Mario Maker, P Doors were introduced in the version 1.30 update. They have new sprites for all styles, in the same blue as the P Switches with a white or blue "P". Unlike in Super Mario World, they are visible as outlines when not active.