Understanding the dynamics of biofilm formation and its elemental composition is crucial for developing effective strategies against biofilm-associated infections. In this study, we employed scanning electron microscopy (SEM) and energy-dispersive X-ray spectroscopy (EDS) to investigate the morphological changes and elemental compositions of Staphylococcus aureus biofilms. SEM images revealed distinct stages of biofilm development, from initial aggregation to the formation of mature and aged biofilms. EDS analysis consistently showed elevated levels of sodium (Na), oxygen (O), and phosphorus (P) in the biofilm matrix, indicating its high negative charge and the presence of anionic biopolymers. The incorporation of extracellular DNA (eDNA) into the biofilm matrix, leading to significant retention of sodium ions, underscored the importance of electrostatic interactions in biofilm formation and stability. Our findings highlight the potential of EDS analysis in quantifying elemental compositions and elucidating the role of anionic biopolymers in biofilm development.