Skip to content

Instantly share code, notes, and snippets.

@lluchs
Created July 19, 2012 19:54
Show Gist options
  • Save lluchs/3146368 to your computer and use it in GitHub Desktop.
Save lluchs/3146368 to your computer and use it in GitHub Desktop.
CSS tabs
<!doctype html>
<title>Tabs!</title>
<style>
p {
display: none;
}
p#tabs, p:target {
display: block;
}
</style>
<p id=tabs>
<a href="#tab1">Tab 1</a>
<a href="#tab2">Tab 2</a>
<a href="#tab3">Tab 3</a>
<a href="#tab4">Tab 4</a>
</p>
<p id=tab1>Do you believe in magic</p>
<p id=tab2>In a young girl's heart</p>
<p id=tab3>How the music can free her</p>
<p id=tab4>Whenever it starts</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment