Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- Component Code -->
<div class="max-w-screen-xl mx-auto p-5 sm:p-10 md:p-16 relative">
  <div class="grid grid-cols-1 sm:grid-cols-12 gap-10">
    
    <div class="sm:col-span-6 lg:col-span-5">
       <a href="#"><div class="h-56 bg-cover text-center overflow-hidden" style="background-image: url('https://tailwindcss.com/img/card-left.jpg')" title="Woman holding a mug">
            </div></a>
       <div class="mt-3 bg-white rounded-b lg:rounded-b-none lg:rounded-r flex flex-col justify-between leading-normal">
        <div class="lg:pl-16">
              <a href="#" class="text-xs text-indigo-600 uppercase font-medium mb-3 flex items-center hover:text-gray-900 transition duration-500 ease-in-out">
                Fashion
              </a>
              <a href="#" class="text-gray-900 font-bold text-lg mb-2 hover:text-indigo-600 transition duration-500 ease-in-out">The perfect summer sweater that you can wear! </a>
              <p class="text-gray-700 text-xs mt-2">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis eaque, exercitationem praesentium nihil.</p>
            </div>
       </div>
    </div>
    
    <div class="sm:col-span-6 lg:col-span-4">
      <div class="flex items-start mb-3 pb-3">
            <a href="#" class="inline-block mr-3"><div class="w-20 h-20 bg-cover bg-center" style="background-image:url(https://media.gettyimages.com/photos/cristiano-ronaldo-of-juventus-fc-looks-dejected-during-the-uefa-of-picture-id1227967060?k=6&m=1227967060&s=612x612&w=0&h=cMSMlRyI6YAzcE_C2KgHGRLeVojHYoUhIvhwPBYv8f4=);"></div></a>
            <div class="text-sm">
              <p class="text-gray-600 text-xs">Aug 18</p>
              <a href="#" class="text-gray-900 font-medium hover:text-indigo-600 leading-none">Cristiano Ronaldo of Juventus FC looks dejected during the...</a>
            </div>
          </div>
      <div class="flex items-start mb-3 pb-3">
              <a href="#" class="inline-block mr-3"><div class="w-20 h-20 bg-cover bg-center" style="background-image:url(https://media.gettyimages.com/photos/lionel-messi-and-marcandre-ter-stegen-of-fc-barcelona-waits-in-the-picture-id1266763488?k=6&m=1266763488&s=612x612&w=0&h=8vxz9HfQVfrff5N7d1lBVxtLamRQGK3J3lyHkUuuIiw=);"></div></a>
              <div class="text-sm w-2/3">
                <p class="text-gray-600 text-xs">Jan 18</p>
                <a href="#" class="text-gray-900 font-medium hover:text-indigo-600 leading-none">Barcelona v Bayern Munich </a>
              </div>
            </div>
      <div class="flex items-start mb-3 pb-3">
            <a href="#" class="inline-block mr-3"><div class="w-20 h-20 bg-cover bg-center" style="background-image:url(https://media.gettyimages.com/photos/cristiano-ronaldo-of-juventus-fc-looks-dejected-during-the-uefa-of-picture-id1227967060?k=6&m=1227967060&s=612x612&w=0&h=cMSMlRyI6YAzcE_C2KgHGRLeVojHYoUhIvhwPBYv8f4=);"></div></a>
            <div class="text-sm">
              <p class="text-gray-600 text-xs">Aug 18</p>
              <a href="#" class="text-gray-900 font-medium hover:text-indigo-600 leading-none">Cristiano Ronaldo of Juventus FC looks dejected during the...</a>
            </div>
          </div>
      <div class="flex items-start">
              <a href="#" class="inline-block mr-3"><div class="w-20 h-20 bg-cover bg-center" style="background-image:url(https://media.gettyimages.com/photos/lionel-messi-of-fc-barcelona-looks-dejected-following-his-teams-in-picture-id1266341828?k=6&m=1266341828&s=612x612&w=0&h=FZi-bSrIlOEE01780h79GsbBYPqZo2l3aaCxoktWADY=);"></div></a>
              <div class="text-sm w-2/3">
                <p class="text-gray-600 text-xs">July 23</p>
                <a href="#" class="text-gray-900 font-medium hover:text-indigo-600 leading-none">Barcelona v Bayern Munich - UEFA Champions League </a>
              </div>
            </div>
    </div>
    
    <div class="sm:col-span-12 lg:col-span-3">
       <a href="#"><div class="h-56 bg-cover text-center overflow-hidden" style="background-image: url('https://tailwindcss.com/img/card-left.jpg')" title="Woman holding a mug">
            </div></a>
       <div class="mt-3 bg-white rounded-b lg:rounded-b-none lg:rounded-r flex flex-col justify-between leading-normal">
        <div class="">
              <a href="#" class="text-xs text-indigo-600 uppercase font-medium flex items-center hover:text-gray-900 transition duration-500 ease-in-out">
                Fashion
              </a>
              <a href="#" class="text-gray-900 font-bold text-lg mb-2 hover:text-indigo-600 transition duration-500 ease-in-out">The perfect summer sweater that you can wear! </a>
              <p class="text-gray-700 text-xs mt-2">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
            </div>
       </div>
    </div>
    
  </div>
</div>

<!-- Credit: Componentity.com -->
<a href="https://componentity.com" target="_blank" class="block">
  <img src="http://codenawis.com/componentity/wp-content/uploads/2020/08/logo-componentity-%E2%80%93-9.png" class="w-48 mx-auto my-5">
</a>



  
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300,400;500,600;700&display=swap");

body {
  font-family: "Poppins", sans-serif !important;
}

              
            
!

JS

              
                
              
            
!
999px

Console