(CNN) -- This Halloween, 5-year-old Dylan Warren is going to be Anakin Skywalker from "Star Wars." The kindergartner in Rumson, New Jersey, likes Halloween candy, but he knows he'll have to follow his mother's rules about how much he can have.
Bianca Warren, 2, and Dylan Warren, 5, often hear their mom say Halloween candy is bad for their teeth.
"My mom doesn't like me to eat it," Dylan told CNN this week.
Swati Rajmane-Warren, Dylan's mother, tells her children that they shouldn't eat too much candy, because it's bad for their teeth -- and generally, the line works, she said.
Meera Garcia, a physician in Atlanta, Georgia, also regulates the amount of candy her daughters, Violet and Chloe, take in for Halloween because she's concerned about their teeth.
"It's more candy than probably a child should eat in a whole year," she said. "You don't want to be a mean parent and 'no, you can't eat all the candy.' But you can just imagine what they're doing to their appetites, their diet and their teeth."
As little witches, ghosts and Jedi go scouring their neighborhoods for sugary treats, parents worry that Halloween means trouble for their teeth. But dentists say parents can take simple steps to promote their children's dental hygiene without taking away all the fun of collecting candy. Blog: Dr. Sanjay Gupta's tips for a healthy Halloween
For example, although some parents may be tempted to space out the amount of candy their children consume after Halloween, dentists have advice to the contrary: When it comes to teeth, it's better to eat a whole lot of candy at once than to space out candy consumption over time. Basically, the fewer episodes of candy eating, the better.
It makes sense, given that cavities form when bacteria in plaque ferments the sugars in candies and creates acid that attacks the tooth's surface, says Dr. Clarice Law, assistant professor of dentistry at the University of California-Los Angeles School of Dentistry.
Repeated "attacks" lead to cavities, so eating a bunch of candy -- for example, with a meal -- and then brushing your teeth is better than spreading that candy out over time.
Law doesn't recommend bingeing but does advise that children limit their candy-eating episodes. Read more about good candy, bad candy in Consumer Tips
"The key message is that the longer the sugar stays on the teeth, the more damaging it is to the teeth," said Dr. Joel Berg, chair of the pediatric dentistry department at University of Washington School of Dentistry and head of dentistry at Seattle Children's hospital. "So it's more about frequency of exposure than the quantity of exposure."
Along the same lines, dentists say, more fluid, easily dissolvable candies such as chocolate are better for children's teeth than sticky treats. Gummy worms and caramels stick to your teeth, continuously providing sugar to bacteria that cause cavities. Hard candies that children suck on for long periods of time also promote cavities, dentists say.
Brushing after eating candy makes a big difference, dentists say.
Parents should start thinking about their children's dental hygiene from age 1 and learn how to brush their young kids' teeth: Until age 7 or 8, children can't brush well by themselves, Berg said. They should also have regular dental checkups and find out at the dentist's office how much fluoride they should be getting.
Berg usually hands out toothbrushes instead of candy on Halloween night: "At first, at the beginning of the night, you're a nerd, but at the end of the night, you're popular," he said.
Garcia limits her children's trick-or-treating to one street or neighborhood and then determines the amount of candy her kids are going to eat per day after their Halloween adventures.
After about a week, Garcia gets rid of all of the candy except certain chocolates, because she doesn't want her kids to have the sticky ones.
"I think moderation needs to be the key to having a wonderful Halloween," she said.
Beyond trick-or-treating, Rajmane-Warren also goes with her children to Halloween parties where they are surrounded by candy.
"You can't say no to them when everybody else is around eating it, but you just limit what they have, or if they even grab a whole pile of it, I just take it away," she said.