See
How to create :target-only tabs
Tab 1
Tab 2
Tab 3
This is tab 1.
This is tab 2.
This is tab 3.