WASHINGTON AREA residents are surrounded by so much history, they often fail to notice that just 40 miles away, practically on the doorstep of the nation's capital, lies another mother lode of it.

It's in Baltimore.

Besides history, Baltimore has the Pimlico Race Course, site of the Preakness, the second jewel in the Triple Crown of thoroughbred horse racing. This year it will be run on May 20; and although nearly 80,000 people will see the race, no more than 25 percent of them are expected also to take a look at Baltimore's historical sites while they're there.

But, then, we hadn't planned to either. We've been going to Baltimore for several years, primarily to visit friends. We were pleasantly surprised recently by our first visit strictly as tourists.

The focal point of the Preakness itself will be in far northwest Baltimore. But the Preakness is a time of celebration in the city and promoters of the Preakness Cultural Festival have blocked out 11 days for various special events, from May 11-21. Most of them, including a huge parade with 5,000 participants, a boat regatta and entertainment, will center around the inner harbor area on the south side of the city.

The inner harbor is close to the Washingtonian's easiest point of entry into the city, via the Baltimore-Washington Parkway, which becomes Paca Street. Paca crosses Pratt Street, which leads past the harbor.

Technically, the inner harbor is formed by the northwest branch of the Patapsco River, which flows into the Chesapeake Bay. For several years the city has been working to turn the area into a visitors' mecca. And it has done a good job, creating spacious, park-like grounds that ring the harbor from the skyscrapers around the west side to Federal Hill, a knoll that affords a splendid view of the city.

Some construction is still going on, partly for a subway and partly for the large convention center in an area between the harbor and the parkway. Parking is in metered spaces anywhere along the inner harbor or at a large metered parking lot on Pratt Street across from the USF (for Frigate) Constellation, one of the three original ships of the U.S. Navy and, its literature says, "the world's oldest ship continuously afloat." It sits at Pier 1.

In front of the Constellation is an information kiosk where you can obtain pamphlets for most of the sites you will want to see in the city.

There are problems for the tourist in Baltimore. It is a big city (7th largest in the United States, compared with 9th-ranked Washington), with the usual traffic and parking hassles. But both seem less severe than in Washington - at least on the weekend. Another problem is that the hours of many of the sites you will want to see are unnecessarily restrictive, especially on Sunday, so you'll have to plan carefully.

On the average weekend, a day can be spent in the inner harbor area. During the two weekends of the "Eleven Days in May" Preakness Festival, Saturday and Sunday can easily be spent there.

Beginning at the harbor, the Constellation is an interesting attraction. You can wander at will through the three levels below the top deck. Launched at Baltimore in 1797, it set sail the following year as the U. S. Navy's first ship at sea. It fought in the War of 1812 (it was off Washington in the Potomac when the fighting began), served during the Civil War and has sailed around the world, including the inland waters of China.

It was used as a training ship at Annapolis after the advent of the steamship, served as a ceremonial flagship of the Atlantic Fleet during World War II and, since restoration 20 years ago, floats in Baltimore's harbor for tourists.

The Constellation is loaded with cannons and has surprisingly spacious decks below. Hours are 10-3:45 Saturdays, 10-4:45 Sundays; admission fees are $1.50 for adults, 50 cents for children and senior citizens.

Until the water taxi service around the harbor begins near the end of May, you'll have to get back in your car and drive a short distance to Pier 4 and the next sites. It's a long, tough walk around the site where an aquarium is under construction.

Five Fathoms, your starting point for this tour, is a former lightship that now serves as a floating maritime museum; it's well worth a visit. On the other side of the pier is the USS Torsk, a submarine that sank Japanese ships during World War II but is probably better known in the Navy as the ship that sank a Japanese train. The train happened to be crossing a bridge during a torpedo battle and the bridge was hit, knocking the train into the water. One ticket, for $1.50 adult, 50 cents children, includes both vessels.

About this time of the year, several tour boats begin business in the harbor. They include the Baltimore Defender, which makes round trips to Ft. McHenry, and the Baltimore Patriot, which provides harbor tours.

You can drive to Ft. McHenry easily. Follow the harbor around to Key Highway and then look for the signs to the fort. Admission is free and you can wander along the battlements of the star-shaped fort and into old barracks that now serves as museums.

About three weeks after the British sacked the Capitol and the White House in August, 1814, British warships moved into the Patapsco River and anchored two miles off Ft. McHenry, the main defense line for Baltimore. The ships' guns could reach the fort, but the fort's guns could not reach the ships.

Francis Scott Key, born in what is now Carroll County, northwest of Baltimore on the Pennsylvania line, was a lawyer during the war and wound up on a British ship trying to negotiate the release of a Maryland doctor held prisoner. The negotiations were successful; but since the British were about to begin intense shelling of the fort, they made him remain aboard the ship Surprise on the nights of Sept. 12 and 18.

Key watched the shelling, which lasted for 25 hours. On the morning of the 14th, he was so moved at seeing the huge flag of 13 stars still flying over the fort at dawn when the shelling stopped, that he wrote a poem. He later asked that it be sung to the British tune, "Anacreon in Heaven," and it was first sung in a Baltimore tavern. Not until 1931 was the tune, renamed "The Star-Spangled Banner," declared the national anthem.

Three other good places to visit, all west of the harbor area, are Babe Ruth's birthplace, the Mount Clare Mansion and the B & O Railroad Museum at the old Mount Clare Station (open 10-4). Antique railroad engines and cars are on display in the roadhouse and outside yards of the museum at Pratt and Poppleton streets.

Our favorite place and that of many nontouring Washingtonians, including many embassy cooks, is the Lexington Market, up Paca Street about a mile from the harbor. The market occupies two large warehouse-like buildings on either side of paca, just beyond Lexington Street.Parking is ample and cheap in the garage next to the market on the west side of Paca.

The west market is a good place to eat, at stand-up counters. The east market is better for food supplies, especially baked goods, seafood and cheeses. Even a supermarket for boxed and canned goods is located in the east building. Each building is bright, colorful and clean, with reasonably wide aisles. The market, with more than 100 stalls, has stood there since the early 1800s. The stand-up food counters specialize in everything from raw oysters to Mexican food, fried chicken, barbeques and oriental dishes. No junk food there.

Vegetable, fruit and meat stalls are piled high with attractive wares. The prices aren't much different than those in Washington's own Eastern Market, but the shopping is far more pleasant. Lexington Market is closed Sundays, open 8-6 weekdays and Saturdays.

After a day in town, the horse country north of Baltimore provides a pleasant area for a Sunday drive. Start at Glyndon, off U.S. 140, and drive the back roads southeast.

If you stay in a motel north of Baltimore, a good - although very expensive - bet for eating is the Milton Inn at Sparks, Md. The oldest building in the Baltimore area, it's been an inn off and on for more than 200 years. During one of the off periods it served as a school that claimed John Wilkes Booth as a student long before he became President Lincoln's assassin.

The food is well-prepared French, the selection wide, and the ambience a bit stiff, since the inn maintains a formal atmosphere. The management wants men to wear a suit coat and tie; and if you don't (I wore a leather jacket and tie), they shunt you off into a side room where the surroundings are more spacious, quieter and nicer than that of the formal dining area and where a dedicated waiter named Foster serves.

We gorged on duck l'orange and an exceptional veal marsala. With pate and oysters for appetizers, wine and parfaits for dessert, we paid a fat, $65 check.

Preakness festival activities include: a balloon race at Patterson Park, on Eastern Avenue east of the harbor; jousting near the Baltimore-Washington International Airport south of town, and rugby at Rash Field at the foot of Federal Hill, all on Saturday, May 13. The next day a festival parade begins at 1:30. Working boats of the bay will be on view in the inner harbor. Both nights a "dancing-waters" display will be held there.

On Preakness weekend itself, if you don't want to watch the race (although officials say there's always space in the infield for $5 a head), you can attend, the Mayor's Regatta, featuring 200 boats in the harbor. It is held again on Sunday, along with kite-flying and picnicking on Federal Hill where it usually is not allowed.

If you can't sleep on the night of May 12, you can join the first of the planned insomniac tours of the city. Leaving at 1:30 a.m., the tour takes you through block parties, a wholesale fish market, a newspaper printing plant, catacombs and Ft. McHenry at dawn, all arranged by the Baltimore Promotion Council.

Beginning the weekend of June 3 and 4, the inner harbor area will play host to weekly festivals presenting the ethnic heritage of the various groups who make up much of the city's population. Featured will be the crafts, food, music and dances of each group.

Most information on city activities can be obtained by calling the promotion council at (301) 752-8632.