BACK in high school they always told us that brains prevail — that cool gets you only so far.

Well, last week, smarts won — at least one round. Wikipedia went dark and Google blacked out its logo, as the brainiacs of Silicon Valley tilted at the A-list media giants of Hollywood and New York.

At issue were two antipiracy bills that few Americans had even heard of. Suddenly, though, people were buzzing about SOPA and PIPA — short for the Stop Online Piracy Act and the Protect Intellectual Property Act.

The bills were put forward by the entertainment industry to combat unauthorized downloads of movies, music and television via foreign Web sites. The technorati argue that the legislation would hand the government Orwellian powers over the Internet.

It all seemed a bit like a food fight in the school cafeteria between “us” and “them.” Many of the media companies that have championed the legislation — the News Corporation, Viacom, Time Warner, Disney — have a rocky relationship with Silicon Valley. Sure, they want their content on new-school digital platforms — but they also want to keep their old-school profits. As if. Tension between the two sides seems certain to grow as the debate heats up on Capitol Hill.