Marble and onyx have the same mineral content. Those two natural stones are made of calcite, which is the same material that makes up limestone and travertine.
Usually, onyx I easier to distinguish from marble because it is more translucent. Homeowners and designers prefer marble countertop because it is more durable. Onyx is more likely to scratch and chip. Marble can be very easy to scratch and chip too but to a lesser extent.