RICHMOND -- California kids are gulping fewer sugar-sweetened beverages than seven years ago, according to a study released Thursday, a reduction public health advocates hailed as evidence that education campaigns and soda bans in public schools have had an impact.

But the optimism was offset, at least in part, by findings that consumption of the drinks is growing among teenagers.

UCLA's Center for Health Policy Research released the findings from its two-year, 40,000-household study. The results showed that 19 percent of all 2- to-5-year-olds drank at least one sugar-sweetened beverage a day in 2011-2012, a 30 percent drop compared with seven years ago. Among 6-to-11-year-olds, the drop was 26 percent.

Researchers wrote in the report, titled "Still Bubbling Over," that the downturn is linked to soda bans at elementary and middle schools, public health campaigns about the dangers of sugary drinks and growing awareness of the risks of diabetes and obesity.

"Efforts to educate parents and reduce access of these beverages in school have been successful," said Tracey Rattray, director of Contra Costa County Health Services' Community Wellness and Prevention Program.

But Rattray and others noted that while consumption dropped among children under age 11, adolescents and teenagers reported an 8 percent increase.

"We can attribute that to marketing by the beverage industry, often through athlete and celebrity endorsements," Rattray said. "Adolescents are more independent (of their parents)."

The statewide survey had particular resonance in Richmond, the site of a hard-fought political campaign last year to tax sugary beverages that generated worldwide attention. Public health advocates pushed for a ballot measure to levy a penny-per-ounce tax on all sugar-sweetened beverage sales in the city. The Washington, D.C.-based American Beverage Association poured millions into the local campaign, and the measure was trounced by voters.

Some advocates noted that allowing sugar-sweetened sports drinks to be sold on high school campuses may be a factor.

"The study shows us that loopholes are killers," said Dr. Jeff Ritterman, a retired cardiologist and former Richmond Councilman who spearheaded the city's beverage tax proposal "We allow sports drinks in high schools, and we naturally have trouble reducing consumptions among young people exposed to that."

At the RYSE Center in Richmond, a youth center that provides after school activities, staff on Thursday said they discourage sugar-sweetened beverage consumption and eschew vending machines for water coolers.

"We work to break the cycle of sugar highs and crashes and teach kids about health and nutrition," said Cameron Thompson, who teaches art and gardening at the center. "We don't need another generation raised on sugars and fast foods."

The study included interviews with 40,000 households over a two-year period, broken down by county. In Contra Costa County, for example, there was a 24 percent decrease in consumption of these drinks from 2005-2007 to 2011-2012, among children ages 2 to 17, one of the steepest drops in the state. Other Bay Area counties showing drops include Santa Mateo, down 17 percent; San Francisco, down 16 percent; and Santa Clara, down 15 percent. Alameda County registered a 16 percent increase.

Beverage industry advocates credited "industry innovation" for drops in consumption and criticized tax proposals aimed at their products.

The American Beverage Association issued its own statement Thursday morning, crediting its smaller portion sizes and low-calorie options for part of the consumption drop, and asserting that sodas, flavored waters and juices "can be part of a balanced diet."

In Santa Clara and San Mateo counties, initiatives to limit access to sugary drinks have made little headway.

A proposal by San Jose Councilman Ash Kalra to ban the sale of sodas, sports drinks and whole milk at all city facilities died in a council committee in August.

"It is great to see a dramatic drop in the consumption of sugary drinks by young children," Kalra said. "This is a clear indication that parents have learned about the impacts of habitual consumption of sodas and have responsibly acted."

In San Mateo County, health officials last year urged the county to restrict and to tax soda and other sweet drinks because of their public-health cost -- a burden shouldered by counties through publicly funded hospitals and clinics. However, elected officials have not put forth a proposal.

But policy and planning director SaraT Mayer said the San Mateo County Health System runs a collaborative effort to increase access to drinking water at schools, urges youths to take a "Rethink Your Drink" pledge and works to eliminate sugary drinks from vending machines.

Sugar-sweetened beverage consumption among African-American and Latino youths remains higher than for their white counterparts, the report found.

Thirty-five percent of Latino kids under age 11 drink at least one sugary drink per day, as do 30 percent of African-Americans, compared with only 18 percent of whites.

The report also included a series of policy recommendations, such as excluding all sugar-sweetened beverages from city or county activities and facilities and eliminating sports drinks from public schools.

The authors recommended penny-per-ounce taxes at the local level -- such as the effort that was defeated in Richmond -- and called on the state Legislature to impose its own tax-and-use revenue for obesity-prevention programs.

Staff writer Sharon Noguchi contributed to this story. Contact Robert Rogers at 510-262-2726 or rrogers@bayareanewsgroup.com. Follow him at Twitter.com/SFBaynewsrogers.