Scientists have found that the smells and tastes that a baby is exposed to in its first few weeks and months of life are linked to the foods and scents it grows to like.
In effect, the babies are actually tasting the food when they're in the womb.
"During pregnancy the womb is relatively permeable and what the mother takes in goes in a certain dose to the foetus during a time when the brain is being formed, probably with long-term consequences," researcher Benoist Schaal told the Daily Mail.
"An Argentinian study showed babies whose mothers drank during pregnancy licked their lips at the scent of alcohol"
In one experiment, he gave some women aniseed-flavoured sweets and biscuits to eat in the last few days of pregnancy, while others ate their usual foods.
Once their babies were born, the scent of aniseed was wafted past their faces.
Those who had tasted or smelt aniseed in the womb turned towards it and seemed to smile, the American Association for the Advancement of Science"s annual conference heard.
Other experiments show babies to react positively to smells, from carrots to garlic, if they have first sniffed them before birth.
But the effect may not always be beneficial to health, with a taste for cigarettes and alcohol perhaps also being set early in life.
Dr Schaal fed six-month-old babies boring or mixed diets and then looked at how they reacted to being given a new food.
For example, one group of babies was given little but pureed carrots to eat for 10 days.
Another was given carrots for a day, then a day of artichoke and a day of green beans, before starting back on the carrots again.
They were then tested on new tastes such as pureed fish, ham or peas. Those weaned on a varied diet gulped down the new foods, unlike those who were only used to carrots.