If you want to have only one tab open, you can use <input type="checkbox">.

But if you wanna close the opened tab, you must add a “close” button somewhere, like the one below, that is just another styled radio input.