What if kids used a more private Internet, where it would be harder to collect information about them and where they could erase embarrassing photos, comments and videos that could come back to haunt them?

That’s what a group of lawmakers proposed Thursday in joint bills that would curb the tracking of and targeted advertising to online users.

The legislation would prohibit Web giants such as Facebook and Twitter from collecting personal information, including location data, on children ages 15 and younger without that person’s permission (a guardian’s permission already is required for children 12 and younger).

The measure would be the first to focus on the online privacy of teenagers, a group that is leaving extensive digital dossiers because of their prolific use of social media.

“Fifteen and under is a special category and have always been given special protections,” said Sen. Edward J. Markey (D-Mass.), a lead sponsor. “We must not allow the era of big data to become big danger for children.”

The majority of teenagers own smartphones, and nine in 10 use social networks such as Facebook and Twitter, according to a recent poll by Common Sense Media, a child-advocacy group.

The Do Not Track Kids bills are expected to face opposition from big Internet firms and advertisers. They argue that the technological mandates are hard to pull off and that the rules could stifle the advertising industry.

These groups note that there is no way to fully erase data online. Once a picture is posted on Facebook, for example, it could be deleted from one account but multiple people may have shared it.

“There is no way to magically make things disappear on the Internet. It isn’t written in pencil. There is no real eraser button,” said Mike Zaneis, the general counsel of the Interactive Advertising Bureau.

But some lawmakers doubt those arguments, saying tech companies are making billions of dollars by tracking teenagers online and should do a better job of protecting them.

One example of how advertising could hurt young users: A teenage girl with an eating disorder who is searching for dieting information could easily be targeted by weight-loss companies, Markey noted.

The bills are endorsed by the American Academy of Pediatrics and several child advocacy and privacy groups.

The proposals would beef up Internet privacy laws by expanding the protections to children ages 13 to 15. Current laws protect users who are 12 and younger, but child development and privacy advocates note that young teenagers are among the most active and vulnerable group of online users. Their brains are still developing, making them more impulsive and less able to differentiate commercials from other messages.

“It is important to that our teenagers receive protections,” said Rep. Joe Barton (R-Tex.), who sponsored the House bill. “They are prone to mistakes; we need to make sure those mistakes aren’t exploited online.”

College admissions and job recruiters say they look at applicants’ social media profiles, which could punish teenagers for a few regrettable tweets or videos, the lawmakers said.

“As kids and teens live more and more of their lives in online, social network and mobile ecosystems, this legislation empowers them to erase some of their digital footprints and to tell Web operators: Do not track,” said Jim Steyer, president of Common Sense Media.