How to style a button

Let’s see if I understand what you are saying…

You want a button on the web page that effectively clicks the close “X” on the current page’s tab (or by whatever mechanism the current page is closed) and that’s it. No expectations of “what’s next”?