See How to create :target-only tabs

Tab 1 Tab 2 Tab 3