Coastal fish, also called inshore fish or neritic fish, inhabit the sea between the shoreline and the edge of the continental shelf. Since the continental shelf is usually less than 200 metres (660 ft) deep, it follows that pelagic coastal fish are generally epipelagic fish, inhabiting the sunlit epipelagic zone. Coastal fish can be contrasted with oceanic fish or offshore fish, which inhabit the deep seas beyond the continental shelves.
Coastal fish are the most abundant in the world. They can be found in tidal pools, fjords and estuaries, near sandy shores and rocky coastlines, around coral reefs and on or above the continental shelf. Coastal fish include forage fish and the predator fish that feed on them. Forage fish thrive in inshore waters where high productivity results from upwelling and shoreline run off of nutrients. Some are partial residents that spawn in streams, estuaries and bays, but most complete their life cycles in the zone.
Coastal fish are found in the waters above the continental shelves that extend from the continental shorelines, and around the coral reefs that surround volcanic islands. The total world shoreline extends for 356,000 km (221,000 mi) and the continental shelves occupy a total area of 24.3 million km2 (9 376 million sq mi). This is nearly 5% of the world's total area of 510 million km2.
Nearshore fish, sometimes called littoral fish, live close to the shore. They are associated with the intertidal zone, or with estuaries, lagoons, coral reefs, kelp forests, seagrass meadows, or rocky or sandy bottoms, usually in shallow waters less than about 10 m (33 ft) deep.
The intertidal zone of rocky shores can contain indentations which trap pools of salty water, called rock pools. Living in these habitats are communities of hardy plant and animal species specially adapted for coping with the volatile environment around them. The plants and animals interact with each other and with the rock pool to form miniature ecosystems, easily accessible to students and a source of fascination for young children. Plants such as seaweeds, cnidarians such as sea anemones, arthropods like barnacles, and molluscs such as the common limpet and the common periwinkle can be permanent residents of rock pools. But most rock pool animals, such as crabs, shrimp and fish are just temporary residents, occupying a rock pool only until the next tide takes them to a new location.
Some rock pool fish which are temporary residents include the long-spined sea scorpion, the pipefish worm, the rock goby and the common lumpsucker. However some other rock pool fish are territorial in nature, and will stay with the same pool for extended periods. Examples are the common blenny and its near relative the butterfish.
Estuaries are partly enclosed coastal bodies of water with one or more rivers or streams flowing into them, and with a free connection to the open sea. These brackish water habitats form a transition zone between river environments and ocean environments, and ecological successions can form along the way. Estuaries are subject to both marine influences, such as tides, waves, and the influx of saline water; and riverine influences, such as flows of fresh water and sediment. The inflow of both seawater and freshwater provide high levels of nutrients in both the water column and sediment, making estuaries productive natural habitats.
Fishes that spend time in estuaries (or river mouths) need to be euryhaline (tolerant to a range of salinities). Estuaries provide an unstable environment for fish, where the salinity changes and the waters are often muddy and turbulent. In warmer climates, estuaries have mangroves around their edges. At times there may be only a few different fish species present in an estuary, but seasonal migrants, including eels, salmonids, and some forage fish such as herrings and sprats increase the diversity in the estuary.
River estuaries form important staging points during the migration of anadromous and catadromus fish species, such as salmon and eels, giving them time to form social groups and to adjust to the changes in salinity. Salmon are anadromous, meaning they live in the sea but ascend rivers to spawn; eels are catadromous, living in rivers and streams, but returning to the sea to breed. Besides the species that migrate through estuaries, there are many other fish that use them as "nursery grounds" for spawning or as places young fish can feed and grow before moving elsewhere. For example, herring and plaice are two commercially important species that use the Thames Estuary for this purpose.
Mangrove swamps are associated brackish water habitats. Many, though not all, mangrove swamps fringe estuaries and lagoons where the salinity changes with each tide. Among the most specialised residents of mangrove forests are mudskippers, fish that forage for food on land, and archer fish, perch-like fish that "spit" at insects and other small animals living in the trees, knocking them into the water where they can be eaten. Like estuaries, mangrove swamps are important breeding grounds for many fish, with species such as snappers, halfbeaks, and tarpon spawning or maturing among them.
In tropical waters, coral reef fish live amongst or in close relation to coral reefs. Coral reefs form complex ecosystems with tremendous biodiversity. Coral reef fish can be particularly colourful and interesting to watch. Hundreds of species can exist in a small area of a healthy reef, many of them hidden or well camouflaged. Reef fish have developed many ingenious specialisations adapted to survival on the reefs. Coral reefs occupy less than one percent of the surface area of the world oceans, yet they provide a home for 25 percent of all marine fish species.
Coral reefs often depend on other habitats in the surrounding area for the supply of nutrients, such as seagrass meadows and mangrove forests. Seagrass and mangroves supply dead plants and animals which are rich in nitrogen and also serve to feed fish and animals from the reef by supplying wood and vegetation. Reefs in turn protect mangroves and seagrass from waves and produce sediment for the mangroves and seagrass to root in.
Anthias are members of the family Serranidae and make up the subfamily Anthiinae. They are widespread in tropical waters. They have been called the "quintessential reef fish", and make up a sizeable portion of the colourful fishes seen swarming in coral reef photography. Anthias are mostly small, peaceful, beautiful and popular as ornamental fish. They are mainly zooplankton feeders. Anthias shoal and school in large numbers, operating more intimate "harems" within the schools. These harems contain a dominant and colourful male, between 2 and 12 females — who operate a hierarchy among themselves — and one or two "subdominant" males, often less brightly coloured and non-territorial. Within the swarm of females, territorial males perform acrobatic U-swim displays and vigorously defend an area of the reef and its associated harem. Anthias are protogynous hermaphrodites. All anthias are born female; if a dominant male perishes, the largest female of the group will often change into a male to take its place. This may lead to squabbling between the next largest male and the transforming female, whose hormones are now surging with testosterone. This can turn quite vicious in the limited confines of captivity.
Butterflyfish are group of about 120 species belonging to the family Chaetodontidaeof Perchiformes. They include bannerfish and coralfish. They are widespread on coral reefs. Butterflyfish are mostly between 12 and 22 centimetres (4.7 and 8.7 in) in length. The largest species, the lined butterflyfish and saddle butterflyfish, grow to 30 centimetres (12 in). Many species are brightly coloured and strikingly patterned, though other species are dull in colour. Many have eyespots on their flanks and dark bands across their eyes, not unlike the patterns seen on butterfly wings.: 184 Their deep, laterally narrow bodies are easily noticed through the profusion of reef life. The conspicuous colouration of butterflyfish may be intended for interspecies communication. Butterflyfish have uninterrupted dorsal fins with tail fins that may be rounded or truncated, but are never forked. Generally diurnal and frequenting waters of less than 18 metres (59 ft) (though some species descend to 180 metres (590 ft)), butterflyfish stick to particular home ranges. The corallivores are especially territorial, forming mated pairs and staking claim to a specific coral head. Contrastingly, the zooplankton feeders form large conspecific groups. By night butterflyfish hide in reef crevices and exhibit markedly different colouration. Their colouration also makes butterflyfish popular aquarium fish. However, most species feed on coral polyps and sea anemones, which can result in problems for the hobby aquarists.
Clownfish, anemonefish and damselfish are among about 360 species classified in the family Pomacentridae. Most Pomacentrids are associated with coral reefs in the Indo-West Pacific, with a few species occurring in temperate waters. Some species are native to freshwater or brackish estuarine environments.: 205–208  Most live in shallow water, from 2 to 15 meters (6.6 to 49.2 ft), although some species are found below 100 m (330 ft). Most species are specialists, living in specific parts of the reef, such as sandy lagoons, steep reef slopes, or areas exposed to strong wave action. In general, the coral is used as shelter, and many species can only survive in its presence. The bottom-dwelling species are territorial, occupying and defending a portion of the reef, often centred around an area of shelter. By keeping away other species of fish, some pomacentrids encourage the growth of thick mats of algae within their territories, leading to the common name farmerfish. Different species display a wide range of colours, although some are relatively drab. Pomacentrids are omnivorous or herbivorous, feeding off algae, plankton, and small bottom-dwelling crustaceans. A small number eat coral.
Goatfishes are a family Mullidae of about 55 species of perciform fishes, associated worldwide with tropical reefs.: 186 They are typically about 20 cm long, though the dash-and-dot goatfish, grows to 55 cm. Goatfish are tireless benthic feeders, possess a pair of long chemosensory barbels ("whiskers") protruding from their chins resembling a goat's beard. They use these to rifle through the sediments in search of a meal. Like goats, they seek anything edible; worms, crustaceans, molluscs and other small invertebrates are staples. Many species of goatfish are conspicuously coloured and have the ability to change their colouration depending on their current activity. By day, many form large inactive (non-feeding) schools: these aggregates may contain both conspecifics and heterospecifics. For example, the yellowfin goatfish school with blue-striped snappers. When they do that, the yellowfins changes its colouration to match that of the snapper. By night the schools disperse and individual goatfish head their separate ways to loot the sands. The diurnal goldsaddle goatfish changes from a lemon-yellow to a pale cream when feeding. Other nocturnal feeders will shadow the active goatfish, waiting patiently for overlooked morsels. Goatfish stay within the shallows, going no deeper than about 110 metres. Most species do not tolerate brackish water, so they do not enter estuaries or the mouths of rivers.
Other nearshore or shallow water fish live near the shore in depths of less than 10 metres. They occupy the areas over sandy or rocky bottoms, and can be associated with seagrass meadows and kelp forests. They can be divided into demersal fish and pelagic fish. Demersal fish live on or near the sea floor, while pelagic fish live in the water column away the sea floor.
Examples of such shallow water demersal fish, found in both tropical and temperate waters around the world, are triplefins, seahorses, wrasse and flounder. As demersal fish, all these fish spend most of their time on or near the sea floor.
Cleaner wrasses working on a dragon wrasse
Examples of shallow water pelagic fish, found in both tropical and temperate waters around the world, are grey mullet, sprats and garfish. As pelagic fish, all these fish spend most of their time living in the water column away the sea floor.
At the base of food chains are the primary producers. In the ocean these primary producers are mainly a type of plankton, microscopic phytoplankton which drift in the water column. Phytoplankton need sunlight for photosynthesis to power carbon fixation, so they are mainly located in sunlit surface waters. Phytoplankton also need and rapidly use nutrients in the water column. The phytoplankton are eaten by zooplankton, which in turn are eaten by predatory zooplankton. Filter feeders then eat the plankton and larger predatory fish eat the filter feeders (see diagram at the right).
Most filter-feeding pelagic fish found in coastal waters are small, silvery forage fish. Forage fish include fishes of the family Clupeidae (herrings, shad, sardines and pilchards, hilsa, menhaden and sprats), as well as anchovies, capelin and halfbeaks. They use schooling strategies to avoid predators, and different schools of forage fish often associate with each other in open coastal waters. Forage fish feed near the base of the food chain on plankton and fry (recently hatched fish), often by filter feeding. In turn, they are preyed on by larger predatory fish, seabirds and marine mammals.
Worldwide, there are five major coastal currents associated with upwelling areas: the Canary Current (off Northwest Africa), the Benguela Current (off southern Africa), the California Current (off California and Oregon), the Humboldt Current (off Peru and Chile), and the Somali Current (off Western India). All of these currents support major fisheries. Many forage fish are important commercial species, and the schools can be targeted by spotter planes. The fish are caught by purse seiners—fishing boats that use nets to enclose the fish—and can be overfished.
Underwater video loop of a school of herrings migrating to their spawning grounds in the Baltic Sea
Predatory pelagic fishes found on continental shelves worldwide in both tropical and temperate waters include porgies, barracuda, amberjacks and cutlassfishes. They tend to be larger fish, and are carnivorous, feeding on the smaller, silvery forage fish that eat plankton (see section above). Some species also feed on crabs and other invertebrates, foraged from the sea floor.
Great barracuda and jacks
The yellowtail amberjack, pound for pound, is one of the hardest fighting fish in the ocean.
Fish that live on or in close association with the sea floor are called demersal fish. This section discusses the coastal demersal fish that live on the continental shelf, but are living further from the coast and in deeper water than the nearshore fish discussed above.
Demersal fish are white fish. Unlike oily fish, white fish contain oils only in their liver, rather than in the gut, and can therefore be gutted as soon as they are caught, on board the ship. White fish has dry and white flesh. They can be divided into benthopelagic fish (mostly "round" fish) which live near the sea bed, such as cod, and benthic fish (flatfish) such as plaice which live on the sea bed. Benthic fish tend to be "flat", so they can lie on the bottom.
Stargazers are about 50 species of fishes, belonging to the family Uranoscopidae, and found worldwide in shallow waters. Stargazers are venomous; they have two large poison spines situated behind the opercle and above the pectoral fins. They can also deliver electric shocks. They are ambush predators with eyes on top of their heads (thus the name). Stargazers also have a large upward-facing mouth in a large head. They bury themselves in sand with only their eyes showing, and leap upwards to ambush fish and invertebrates overhead. Some species have a worm-shaped lure growing out of the floor of the mouth, which they wiggle to attract prey's attention. Lengths range from 18 cm up to 90 cm, for the giant stargazer Kathetostoma giganteum. Stargazers are a delicacy in some cultures. The venom is destroyed when it is cooked, and stargazers are sold in some fish markets with their electric organ removed. They have been called "the meanest things in creation" and the "worst pet on earth".
Atlantic wreckfish inhabit caves and wrecks. They are good game fish, reaching a maximum reported length of 210 cm (6.9 ft) and weight of 100 kg (220 lb).