Children who spend long hours in front of the television, either watching shows or playing video games, may be ruining their ability to focus on tasks in school, researchers suggest.

A new study finds that kids who exceeded the recommended two hours per day of screen time were 1-1/2 to two times more likely to have attention problems in the classroom.

While previous research has shown a link between lots of screen time and attention problems in kids, the researchers say this is the first study to follow over time how screen time impacts kids' concentration skills.

For the study, psychologists at the Media Research Lab at Iowa State University followed for more than a year a group of about 1,300 elementary children. With the assistance of their parents, the kids logged their TV and gaming hours over a year.

The children averaged 4.26 hours a day of total time watching television and video games -- a figure, the researchers say, that's relatively low compared to the national average in the U.S.

Both the American Academy of Pediatrics and the Canadian Paediatric Society recommend that parents limit a child's screen time to no more than two hours daily.

They then asked the kids' teachers to answer questions about how the children behaved in school -- whether they had difficulty staying on task, for instance, or interrupted others. The teachers also rated the kids on aggressive behaviour and social skills.

The researchers found that attention problems in the classroom grew worse in proportion to how much time kids are in front of television and video games. Those kids who spent more than two hours per day in front of the screen saw their odds having worse-than-average attention problems rise by 67 per cent.

Even after accounting for attention problems the children may have had before they entered the study, those who watched a lot of TV or played a lot of video games had more problems concentrating on schoolwork.

Another arm of the study asked 210 college students to provide self-reports of television habits, video game exposure and attention problems. They found that the longer those young adults spent in front of the TV as kids, the more likely they were to have attention problems -- suggesting that early video game exposure may have lasting consequences.

Those college students who exceeded two hours of daily screen time doubled their risk of having above-average attention problems.

The researchers say it didn't matter how kids spent their screen time -- whether it was watching TV or playing video games: "The associations of screen media and attention problems were similar across media type (television or video games)," they write.

The study is published in the journal Pediatrics, the journal of the American Academy of Pediatrics.

The researchers say they don't know why heavy screen time is linked to attention problems, but they note previous researchers have hypothesized that because most TV shows and video games are so exciting and involve rapid changes in focus, kids then have difficulty paying attention to less exciting tasks, such as schoolwork.

The researchers say the risk of kids developing concentration problems could be reduced if their caregivers followed the AAP and CPS recommendations to limit children's exposure to television and video games to no more than two hours per day.