tabs just html code example

Example 1: tabs css only

input + label {             /* box with rounded corner */  border: 1px solid #999;  background: #EEE;  padding: 4px 12px;  border-radius: 4px 4px 0 0;  position: relative;  top: 1px;}input:checked + label {     /* white background for selected tab */  background: #FFF;  border-bottom: 1px solid transparent;}input ~ .tab {          /* grey line between tab and contents */  border-top: 1px solid #999;  padding: 12px;}

Example 2: tabs css only

<div class="tab content1">Tab1 Contents</div><div class="tab content2">Tab2 Contents</div><div class="tab content3">Tab3 Contents</div><div class="tab content4">Tab4 Contents</div><div class="tab content5">Tab5 Contents</div>

Tags:

Css Example