WASHINGTON (AP) _ The House turned over authority with handshakes and backslaps, with wisecracks and children in the members' benches Tuesday, giving its new leader a chance to draw a contrast with Moscow and Warsaw and the streets of Beijing.

There were still bitter partisan words spoken in the lobbies of a House whose wounds have not yet healed, but Thomas S. Foley's cordial assumption of power as speaker and Jim Wright's surrender were cited by Foley himself as symbolic of the values of the House.

''We are proud to call this the People's House,'' he said.

Taking note of the street struggle in China and the grasping for democratic formulas in Poland and the Soviet Union, he said America could draw satisfaction ''that the values that gave this institution its birth and which have flourished here and sustained us for two centuries now sweep the world.''

The House does these things its own way, with a mixture of rigid ceremony and its customary old-shoe clubbiness.

A voice familiar from State of the Union night bellowed out, ''Mr. Speaker 3/8 The speaker-elect, Thomas S. Foley of the state of Washington 3/8'' The doors parted and Foley marched down the handshake route.

Wright, having surrendered the speakership, left the dais and joined the Democratic ranks. Along the way, he passed six children, members' kids, here for the history of it all, one of them trying out his sunglasses against the bright lights and another twirling a sailor's cap.

Wright, accused of ethical impropriety, announced last week that he was innocent but quitting, a victim of ''mindless cannibalism.'' At Foley's instigation, Wright accepted a standing ovation. His eyes glistened.

Republican Robert Michel of Illinois made a joke of his own inevitable defeat for the speakership. The Republicans dutifully nominated him; the Democrats nominated Foley; the reading clerk called out the names; the Republicans voted for Michel and the Democrats for Foley, who won, 251 to 164.

When the outcome was announced, Michel said he had become ''distressingly expert'' at having been outvoted in these speakership elections - it was his sixth - and he hoped for the day when the Democrats might be in the minority and learn ''the joys of such selfish behavior.''

The Democrats have been in the majority for 35 years, Michel said, serious now, and so long a stretch of uninterrupted power ''can act like a corrosive acid upon the restraints of civility and comity.''

Moreover, he said, ''the distingushed members of the ethics committee,'' who had been about to pass judgment on Wright when he short-circuited the process, ''are neither mindless nor cannibals.'' Wright had spoken of ''mindless cannibalism'' in his resignation speech last week.

So, not far from the surface, rancor remained.

At the Republican caucus which had nominated him, Michel urged rejection of two possible Republican courses toward the Democrats - the ''kiss and make-up alternative'' and ''the French Revolution alternative in which we knit the names of evil Democrats into a waiting list for the political guillotine.''

From the back of the room, some junior members replied musically. They hummed - loudly - the French ''Marseillaise.''

Nor did the day's sweetness suppress the Democrats' ire. Some Democrats aver the Republicans are engaging in ''ethics wars'' which so far have forced Wright out, forced Tony Coelho of California, the party's zealous whip, to quit rather than face an ethics investigation and spread suspicions about another rising Democrat, William H. Gray III of Pennsylvania, whose Memorial Day visit by FBI agents quickly found its way into the newspapers.

Rep. Barney Frank, D-Mass., told reporters leaking such news was ''unjustified character assassination.'' Rep. Patricia Schroeder, D-Colo., accused GOP National Chairman Lee Atwater of spreading venom while in the White House was ''George Bush being kind and gentle, George saying, 'Let's do horseshoeing, let's do barbecues.'''