Thank you very much joob, prairiefire, panjandrum and Elwintee for your explanations and examples

. You helped me to have an idea of how to use them.
Here are some of the examples I saw in deferent resources:
1.'
Replace cap after use' .This is a note on my
white board marker.
2.
but in my
Cambridge dictionary there is a picture showing '
top of a pen'.
' a bottle top' .
Example for cap: '
the camera has a lens cap'
Example for lid: '
lid of the jar' and '
lid on the saucepan'.
3.
Oxford Advance Genie:
Examples for top: 'Where's the
top of this pen?' and '
a bottle with screw top'.
and as the definition of cap: a protective cover for pen, bottle , etc.
Examples for lid:
Dustbin lid,
the lid of the jar.
But which one would you use for ' a box'?
