How viscoelastic properties of the extracellular matrix affect the various biological functions conferred by biofilms is an important question in microbiology. In this study viscoelastic response of Escherichia coli biofilms to genetically altered expression of extracellular matrix components was studied. Biofilms of the wild type E. coli MG1655 and its mutant strains producing different amounts of extracellular matrix components (curli, colonic acid, poly-β-1,6-N-acetyl-D-glucosamine) were used to examine the viscoelastic behavior of biofilms grown at solid -atmosphere interface. The results suggest that the presence of curli proteins dominates biofilm mechanical behavior. The rheological data indicate that cohesive energy of the biofilm was highest in the wild type strain. The results demonstrate the importance of extracellular matrix composition for biofilm mechanical properties. We propose that by genetically altering the expression of extracellular matrix polymers bacteria are able to modulate the mechanical properties of their local environment in accordance with bulk environmental conditions.