With tourists joining in and street people looking on, an essentially festive throng of charity contributors lined up in the District and Maryland yesterday to show their support for Hands Across America -- a project organized to aid the nation's hungry and homeless.

The event, which took a year to put together and 15 minutes to become history, drew a colorful array of participants locally, including President Reagan, area high school bands, sports and entertainment celebrities and a few helpful cows in rural Maryland. It also sparked a face-off of sorts in front of the White House when Mitch Snyder and other advocates for the homeless gathered in Lafayette Park to protest the president's presence in the line.

In the District, organizers said that nearly 300,000 people joined the line at some point along the 29-mile route. Metropolitan and Park Police, however, said the turnout was closer to 100,000. In any case, there was general agreement that most of the line appeared to be solid through all eight wards of the city.

"Most of the people signed up at the last minute," said Donna Brazile, the coordinator for the District segment of the 4,100-mile human chain. She said most areas, especially along the Mall and near the White House, had so many more people than were needed that the line doubled and tripled up in several places.

The afternoon gathering was peaceful, according to police, with no arrests. Many participants brought picnic lunches and lawn chairs to sustain them through the event and cameras to record it. It was a day of balloons, Popsicles and music, even though the majority of those who tried to sing the Hands Across America anthem shortly after 3 p.m. had no idea of the words or tune.

"It was thrilling," said Colleen McGowan, a 16-year-old high school debating team member from Michigan. She and her friends, who had been in Baltimore attending a competition, came to Washington and claimed spots near the Washington Monument.

"This was the only place to be in the nation today," she said. "I got goose bumps."

Pennsylvania Avenue in front of the White House drew a large number of participants and spectators, apparently lured by Reagan's last-minute decision to join the line and to have it diverted onto the White House grounds.

But the president's participation drew Snyder and other members of the Community for Creative Non-Violence (CCNV), who set up a protest line in Lafayette Park and chanted disapproval of administration policies toward the poor.

"What about tomorrow? What about tonight?" some of the protesters shouted. CCNV supported the Hands Across America fund-raising effort, but there had been some concern that the one-time event would not result in a sustained commitment to help the nation's hungry and homeless.

"It's not fair for him to stand there and act as if he's a caring person of America," said Snyder, calling it "hypocritical" for the president to be a part of the Hands Across America benefit. "There are not sufficient resources and his government, his administration, is doing nothing to help the situation. Mr. Reagan holding hands is not very impressive," said Snyder, who has fought with the administration over funds to repair a decaying homeless shelter operated by CCNV.

Reagan and White House staff members and their families linked up with the line behind a huge tarp set up in front of the mansion's porch, and the president may not have been aware of the nearby demonstration.

Hands Across America organizers say they hope to raise between $50 million and $100 million nationwide by the time all the money is counted and to distribute the majority of it among existing shelter and antihunger groups. But because most of the contributions are still coming in, there were no estimates yesterday on how much will be raised locally.

In the Washington and Maryland segments of the line, most of yesterday's hand-holders seemed drawn to the event because they believed it would be historic. They also seemed more comfortable dealing with a charitable organization than with the poor and mentally ill close at hand.

At Dupont Circle, for example, a panhandler moved among the crowd begging for "a little spare change." Later, an old man, intoxicated and walking with the aid of a crutch, made a similar plea. Most of the Hands participants, waiting for the line to form, looked the other way.

However, the street people of the nation's capital -- the winos in Farragut Square, the raving bag ladies in Lafayette Park, the mud-caked men stretched out on the steps of the Veterans Administration and Treasury buildings -- seemed only curious or downright oblivious as hordes of well-dressed, cheery Hands participants streamed to and from the day's activities.

The District line, with Mayor Marion Barry at the District Building, linked up except for a small gap at Bladensburg Road and Mount Olivet Road NE, where Brazile said the people she needed "were down at Hechinger's listening to Troublefunk," a local band. Also, the Sousa Bridge over the Anacostia River was empty of hand-holders as a safety precaution.

Hands organizers in Maryland said they needed about 200,000 people to fill the route through the state and estimated that they got 90 percent of them. Police were unable to provide a crowd count, and there were several reports of gaps along the route.

Maryland Gov. Harry Hughes joined the line in Prince George's County while Maryland Attorney General Stephen H. Sachs and U.S. Rep. Barbara A. Mikulski (D-Md.) joined Democratic and Republican politicians along the route in downtown Baltimore. In Montgomery County, the line was tightest along the most commercial sections of Rte. 355.

Traffic was stopped at more than 300 intersections in the region as the line hooked up, usually without incident.

On Wisconsin Avenue near the Washington Cathedral, however, traffic was backed up for nearly 40 minutes after several hundred people left the sidewalk to stand in the middle of the street. While some motorists sat in their cars, furious at the unexpected blockade, others left their vehicles and joined the line.

For most people, however, their participation was planned, and many went out of their way to be involved in the benefit.

"My dad raised us to help the poor people, and I believe in it," said Clyde L. Grossnickle, a 71-year-old Myersville, Md., farmer who joined the line in Frederick County with 14 members of his family and three of his prize bulls.

Grossnickle loaded his freshly shampooed bulls -- Big Red, Middlebrook Thunder and Mr. Trademark -- into a truck and transported them to a hard-to-fill gap on Rte. 40. He said he figured the 1,200-pound bulls would take the place of 12 people so he contributed $120 to purchase them spots in the line.

Also joining the line along Rte. 40: Judy and Si Gassett of Rockville, celebrating their 46th wedding anniversary with a picnic of fried chicken, baked beans and potato salad.

In the District, several officials and celebrities -- Coretta Scott King, the Rev. Billy Graham, Marla Gibbs, Raul Julia, the Gatlin Brothers, Mary Lou Retton -- who had lent their name to the event, planned to show up yesterday to be with crowds of lesser known participants.

But others, members of the official Hands organizing staff, found additional uses for the event. Ron Maranian, for one, celebrated his 41st birthday yesterday when he was not directing people in Sheridan Circle. He and other Hands staff members had people sign his birthday card and served cake and ice cream to prospective hand-holders, who will forever be thought of by Maranian and his friends as "the world's longest receiving line."

Staff writers John Ward Anderson, Barbara Carton, Margaret Engel, Beth Kaiman, Lenore Magida, Lois Munday, Peter Perl, Douglas Stevenson and Linda Wheeler contributed to this report.