In the world of matching wine with food, little else is fishier than the hackneyed advice, “White wine with fish.”

“Just any sort of white wine” isn’t the right advice. Each type of seafood or fish has its proper type of wine — and some of it is red.

The same guidelines apply to the best pairings of wine and fish that also apply to matching wine and all those foods that don’t have fins and gills. That is, what matters are certain elements or components in the wine and in the food, things such as salt, sweetness, acidity and fat.

For example, a plain slab of halibut, grilled with a pinch of salt, calls for one type of wine — a Macon blanc from Burgundy, for example — while the same fish, grilled and topped with a mango-cilantro salsa, won’t be as delicious with the same wine (the sweetness of the salsa will make the Macon taste bitter). Instead, an off-dry riesling from Germany would be perfect, because sweetness in food requires the same level of sweetness in wine.

One of the most defining characteristics of seafood, as distinct from freshwater fish, is its saltiness. Seafood grows up, after all, breathing salt water its entire life. Foods high in salt require either a high acid wine or a wine with marked sweetness. That’s why oysters and Chablis (or Muscadet) work well together.

Here are some specific recommendations for various sorts of seafood and the wines they love best:

Oysters: Try wines as high in acidity as you can tolerate, especially for the brinier bivalves such as French Belons. Go for Muscadet, Chablis premier cru, Sancerre, dry Vouvray, or the driest, most highly acidic of white wines, trocken German riesling. Less salty, creamy oysters — for instance Washington Olympias — go well with wines of tamer acidity, such as Alsatian pinot blanc.

Crab: The preparation matters with this quintessentially sweet-salty shellfish. Plain steamed crab, with no butter dip, will taste delicious with softer versions of sauvignon blanc (from California, say, or South America), while richer preparations — butter dip, crab cakes, chowder — need wines high in acidity, such as those listed above for briny oysters.

Lobster: Treat lobster like crab, though lobster flesh has less sweetness than crab flesh and, so, won’t require exactly similar wines. A fine match for plain, steamed lobster, even with butter, is Macon-Villages. Monkfish also fits in this category, as does shrimp. Again, the preparation matters a great deal. If fatty, go for high acidity. If sweet or slightly sweet, be sure there is some sweetness in the wine. If acidic (tomatoes, for example, or vinegars), the wine must have acidity, too.

Oily-fleshed seafood: This sort of seafood (sardines, some tuna, salmon, herring, some swordfish, pink or coho trout) may be the healthiest of all fish because of its high concentration of omega-3 fatty acids. It’s also one of the hardest to match with wine. That’s because the same fatty oils can make many a dry wine taste metallic. If it’s possible to prepare these fish with tomatoes, olives and herbs — as Veracruz, for example, or Provencal — a light red such as Beaujolais or Oregon pinot noir might be the ticket.

Firm-fleshed seafood: Swordfish, shark, tuna, mahi-mahi and some sea bass are really cows that swim. They’re meat, chewy, textured, best served seared on the outside and rare within. Even in the simplest preparations, seafood such as this can handle red wine. But the red needs to be high in acidity and moderate in both tannin and alcohol, such as Cote de Beaune rouge, Oregon pinot noir or lighter Chianti Classico or Valpolicella. If you wish to serve a white wine here, go for those with some oomph, such as Alsatian pinot gris or gewurztraminer, Puligny-Montrachet or Australian riesling.

Flaky-fleshed seafood: Halibut, sole, cod and roughy are perhaps the most modest of seafood fishes. They are often served in the simplest of manners, a la meuniere, for example, or simply broiled, with the briefest of cooking. They require wines with equal modesty. An enormous California chardonnay, for example, would be boorish alongside any of them. Quiet, demur wines such as Vinho Verde, Greek moschofilero, or much Spanish albarino are the ticket.

Many of the same principles that apply to the matches of wine and seafood apply to those of wine with freshwater fish, although the emphasis on saltiness is of course diminished.

Oily-fleshed freshwater fish: Salmon raised on freshwater farms and most trout are some of the oiliest fish available. As such, wines that are high in acidity make good pairings at the table. Salmon often can tolerate a light red wine, especially if the salmon is prepared with additional elements and flavors such as tomatoes, lemon peel or olives. Light pinot noir is a famous pairing.

Other freshwater fish: Bass, perch, pike and catfish are much like flaky-fleshed seafood, though again with lower salt content. In some cases, with plainer preparations, this is the place for larger wines. The lower salt content of these fish can tolerate the lower acidity of, say, most California or Australian chardonnays. Just make sure that the alcohol level isn’t off the charts (keep it to below 13 percent).