Does the word "top" have the same definition in the next two sentences?

The title should be written at the top of the first page.

He got a bright red top and string for his birthday.
different meanings