What property of objects allow them to float?

Actually, the answer is a bit more subtle than just density. The principle that is behind floating objects is Archimedes' principle:

A fluid (liquid or gas) exerts a buoyant force, opposite apparent gravity (i.e. gravity + acceleration of fluid) on an immersed object that is equal to the weight of the displaced fluid.

Thus, if you have an object fully immersed in a fluid, the total force it feels is given by (positive sign means down):

$$F = \text{gravity} + \text{buoyancy} \\= \rho_\text{object} V g - \rho_\text{fluid} V g \\= (\rho_\text{object} - \rho_\text{fluid}) V g$$

Thus, if the average density of the object is lower than that of the water, it floats. If the object is partially immersed, to calculate the buoyant force you have to consider just the immersed volume and its average density:

$$F = \rho_\text{object} V g - \rho_\text{fluid} V_\text{immersed} g$$

Note that when I was talking about density, I was talking about the average density of the object. That is its total mass divided by its volume. Thus, a ship, even if it is made out of high-density iron it is full of air. That air will lower the average density, as it will increase the volume considerably while keeping the weight almost constant.

If you want to understand this better you can give the following problem a try :)

What is the height an ice cube of side L floats in water?


DENSITY

It is because of densities of the object that is floating and the liquid in which it is floating.

If an object have density lower than a fluid it will float otherwise it will sink.

Density of entire object [mass / volume] should be taken into account and not merely the density of material it is made up of.

  1. A ship made up of iron floats in sea because density of ship i.e. mass of ship/ volume of ship is less than that of water. Here though density of iron is more than water hollowness of ship makes its volume large hence density of "ship" is lower than that of water.

  2. In dead sea you and I can float.

  3. In mercury iron nails float.


An object floats if its upthrust (buoyancy) is in equilibrium with its downwards gravitational force.

In other words (as stated by the wiki page),

$$F_net = 0 = mg - \rho_f V_{disp} g$$

(where all the constants are pretty self-explanatory.)

Clearly then, the properties of the object that determine whether/how it floats are its mass and volume. More specifically, it is the relationship between the two; the density of the object (considering the enclosed volume, i.e. that which water can't enter), must be lower than the density of water $\rho_f$ for it to float.

Note also that is the density function (how the density of the object varies spatially) that determines what and the shape of the object that determines exactly how the object floats (e.g. the water line). This is not necessary just to determine if it floats, however.