(CNN) -- School meals will have to offer fruits and vegetables to students every day under standards issued by the United States Department of Agriculture on Wednesday.
The meal programs, which feed about 32 million students in public and private schools, will have to reduce sodium, saturated fat and trans fats. Schools must also offer more whole grains as well as fat-free or low-fat milk varieties.
These standards go into effect July 1 and will be phased in over a three-year period, according to the USDA.
The new nutrition standards are largely based on recommendations by the Institute of Medicine of the National Academies, as part of efforts to curb childhood obesity. Recent numbers show that about 17% of children in the United States are obese.
Under the new rules, school meals will have calorie minimums and maximums per meal based on the child's age. For kindergarteners to fifth-graders, meals must contain 550 to 650 calories, and for 9th- to 12th-graders, meals must have 450 to 600 calories.
Children will not be forced to take the vegetables and fruits onto their plates; the standards require that the various food groups be offered.
Health groups reacted to the rules mostly favorably, although a controversy erupted in November after Congress decided that two tablespoons of tomato sauce was good enough to categorize a slice of pizza as a vegetable.
Kevin Concannon, the USDA under secretary for Food, Nutrition and Consumer Services, said he wasn't concerned with the tomato paste controversy at this point.
"I'm confident we have a core healthy set of proposed diets for children," he said. "We can, within that, accommodate those recommendations received from Congress."
Food and beverages sold in vending machines will also have to meet nutritional standards.
First lady Michelle Obama and USDA Secretary Tom Vilsack unveiled the standards Wednesday.
"When we send our kids to school, we expect that they won't be eating the kind of fatty, salty, sugary foods that we try to keep them from eating at home," Obama said in a news release. "We want the food they get at school to be the same kind of food we would serve at our own kitchen tables."
The USDA offered a weekly sample lunch menu with before and after comparisons.
Before the new rules, a standard elementary school lunch menu might consist of cheese pizza, canned pineapple, tater tots and chocolate milk. A healthier meal under the new standards would have whole-wheat cheese pizza, baked sweet potato fries, raw grape tomatoes, low-fat ranch dip, applesauce and low-fat milk.
Some parts of the major revamp of school lunches have been rejected by students. The Los Angeles Times reported in December that students trashed the untouched healthier meals and started a booming underground market for junk food. Cafeteria workers in Chicago Public Schools reported that kids were not eating the healthy meals, according to the Chicago Tribune.
"If it's not delicious, kids aren't going to eat it," said Sam Kass, assistant White House chef. "I have lots of confidence in school chefs across the country who are working very hard to try to put delicious foods on the plates of kids."
He cited a Chefs Move to Schools Program, involving 35,000 school chefs who strive to innovate for better-tasting, healthy meals for kids.
The new standards are expected to cost $3.2 billion over the next five years, which was less than the initial estimated price, according to the USDA.
The Healthy, Hunger-Free Kids Act of 2010 gave the federal government more authority to set standards for food sold in vending machines and elsewhere on school grounds.
"The new school meal standards are one of the most important advances in nutrition in decades," said Margo Wootan, nutrition policy director at the Center for Science in the Public Interest. "They're much needed, given high childhood obesity rates and the poor state of our children's diets."
The School Nutrition Association, which represents 55,000 school nutrition professionals, said, "Through healthier choices and nutrition education, school meal programs have made tremendous strides to promote better food choices for America's students. These national nutrition standards will help school nutrition professionals build on their successes."
CNN's Trisha Henry contributed to this story.