If you 'caramelize' an onion, does an onion contain sugar? I love the taste of lightly fried sliced onion. I've heard this referred to as 'caramelizing' the onion. 

Is there sugar in the layers of an onion that is changed to caramel, or is this just a phrase?

My question is: If you 'caramelize' an onion, do they contain sugar?
Yes, onions contain sugar, just like most fruit and vegetables. It is not simply a common phrase, it is true caramelization. 

They have 4.24 g of sugar per 100 g in total (wet weight). For dry weight 40% is sugar. See the USDA nutrient database for more details.