I need to add an X button on my tab headers so that the user can close the tabs easily and intuitively.

I want it to work like firefox tabs, where you can press the X on any tab to close it at any time.

Is there any way to do this?