It isn't exactly on top. It isn't floating. It's just contained in a membrane so that it doesn't flatten out as far as the white, which is not contained inside a membrane. If you break the yolk, it flattens out, and becomes the same height as the white.
Science experiment for kids (and curious adults): Separate the yolk from the white, place the yolk by itself on a flat surface, and observe how tall it stands. Break open another egg, empty it onto a flat surface, and see how tall the yolk stands. Both eggs should be the same age, kept in the same conditions, and as similar to each other as you can manage, size, shell density, etc.
Try breaking an egg into a clear glass saucer, so you can look at it from underneath.
Another interesting thing to do, is candle fresh eggs, to see as much as you can about the shell structure, and see if you can detect the yolk through the shell. You can see a spiral pattern to the shells, sometimes. This is because he egg is turning as it passes through the oviduct, and as the layers of shell are deposited. Sometimes you'll see a spiral around the egg where there's a line of thinner shell.
These ordinary eggs that we see everyday, are really amazing little packages. So are kids, good for you, helping your young one learn cool things!