In this paper, a compact (40×40×0.79 mm3) wideband guitar-shaped antenna with defected ground structure (DGS) is designed and analyzed. Several techniques, including incorporating four symmetrical slots on the patch and employing a T-shaped defected ground structure (DGS) on the ground plane, have been utilized to significantly enhance the antenna's operational performance. This design covers the frequency range of 2.51-5.19 GHz, which is applicable for the WLAN 3.65 GHz (IEEE 802.11y: 3.655 - 3.695 GHz), WLAN 4.9 GHz (IEEE 802.11j: 4.94 - 4.99GHz), and 5G NR N77 (3.3-4.2 GHz), N78 (3.3-3.8 GHz) and N79 (4.4-5.0 GHz) bands. A low-loss Rogers RT 5880 material is utilized as the substrate layer, where the dielectric constant of is 2.2, and the loss tangent is 0.0009. Time-domain analysis of the antenna was carried out using CST Microwave Studio. The antenna has an operating frequency of 3.44 GHz, a return loss of -42.50 dB, a VSWR of 1.01, and a maximum efficiency of 95.69%.