It is known that the content of trace and major elements in plants is dependent on several factors, such as type of species, soil properties, climate conditions, agricultural and agrichemical factors, pollution. The aim of the study was to quantify element content of root vegetables grown in farmlands and allotment gardens in Latvia. Samples of onion bulbs and carrot roots were analyzed by atomic absorption spectrometry and inductively coupled plasma mass spectrometry. Quantitative amounts of 17 trace elements (Ag, As, Ba, Cd, Ce, Co, Cr, Cu, La, Mn, Ni, Pb, Rb, Se, Sr, V, Zn) and 5 major elements (Ca, Fe, K, Mg, Na) were determined. It was detected that carrot roots contained higher amounts of several elements than onion bulbs. Differences in element content of vegetables were also detected between the subgroups of samples grown in farmlands versus samples grown in allotment gardens. Data revealed that onions grown in farmlands were more affected by contaminants.