cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <ul class="tab">
  <li><a href="">onglet 1</a></li>
  <li><a href="">onglet 2</a></li>
  <li><a href="">onglet 3</a></li>
<div class="content">
  <p>Contenu 1 : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero quasi, eius sequi molestias. Quod facilis eaque ut eum, quas ratione, corporis natus quibusdam. Necessitatibus perferendis, amet quidem suscipit, eos voluptatum.</p>
<div class="content">
  <p>Contenu 2 : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam repellat veritatis harum reiciendis eos natus quo vero alias quae delectus praesentium, voluptate exercitationem ut nobis nulla quibusdam, et labore quia!</p>
<div class="content">
  <p>Contenu 3 : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quod, fugiat. Aliquam adipisci inventore officia, doloribus placeat accusantium velit, cumque nemo distinctio aspernatur quam possimus aliquid sint molestias, ipsum esse quia!</p>
  margin: 10px;
  overflow: hidden;
  background-color: rgb(100,100,100);
  margin: 5px;
.tab a{
  text-decoration: none;
  display: block;
  float: left;
  padding: 10px;
  transition : all 0.5s ease;
  color: white;
.tab .active{
  background-color: rgb(200,200,200);
  color: #000;
  display: none;
  animation : fade 1s;

@keyframes fade {
  0% {opacity: 0;}
  100% {opacity: 1;}
  function $(selecteur){
    return document.querySelectorAll(selecteur);
  var onglets = $('.tab a');
  var contenus = $('.content'); 
  function reset(obj,i){
    obj.style.display = "none";
  function tab(evt){
    evt.preventDefault(); // annule l'action du lien'
    contenus[this.rang].style.display = "block";
  var init = function(obj,i){
    obj.rang = i ;

  contenus[0].style.display = "block";
Loading ..................