Is the word "top" used in the same way in the following two sentences?

He removed the top of the carton.

He couldn't get the top off of the bottle.
the same meaning