css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

			<th>First Name</th>
			<th>Last Name</th>
			<th>Job Title</th>
			<th>Favorite Color</th>
			<th>Wars or Trek?</th>
			<th>Date of Birth</th>
			<th>Dream Vacation City</th>
			<th>Arbitrary Data</th>
			<td data-title="First Name">James</td>
			<td data-title="Last Name">Matman</td>
			<td data-title="Job Title">Chief Sandwich Eater</td>
			<td data-title="Favorite Color">Lettuce Green</td>
			<td data-title="Wars or Trek?">Trek</td>
			<td data-title="Date of Birth">January 13, 1979</td>
			<td data-title="Dream Vacation City">Gotham City</td>
			<td data-title="GPA">3.1</td>
			<td data-title="Arbitrary Data">RBX-12</td>
		  <td data-title="First Name">The</td>
		  <td data-title="Last Name">Tick</td>
		  <td data-title="Job Title">Crimefighter Sorta</td>
		  <td data-title="Favorite Color">Blue</td>
		  <td data-title="Wars or Trek?">Wars</td>
		  <td data-title="Date of Birth">July 19, 1968</td>
		  <td data-title="Dream Vacation City">Athens</td>
		  <td data-title="GPA">N/A</td>
		  <td data-title="Arbitrary Data">Edlund, Ben (July 1996).</td>
		  <td data-title="First Name">Jokey</td>
		  <td data-title="Last Name">Smurf</td>
		  <td data-title="Job Title">Giving Exploding Presents</td>
		  <td data-title="Favorite Color">Smurflow</td>
		  <td data-title="Wars or Trek?">Smurf</td>
		  <td data-title="Date of Birth">Smurfuary Smurfteenth, 1945</td>
		  <td data-title="Dream Vacation City">New Smurf City</td>
		  <td data-title="GPA">4.Smurf</td>
		  <td data-title="Arbitrary Data">One</td>
		  <td data-title="First Name">Cindy</td>
		  <td data-title="Last Name">Beyler</td>
		  <td data-title="Job Title">Sales Representative</td>
		  <td data-title="Favorite Color">Red</td>
		  <td data-title="Wars or Trek?">Wars</td>
		  <td data-title="Date of Birth">July 5, 1956</td>
		  <td data-title="Dream Vacation City">Paris</td>
		  <td data-title="GPA">3.4</td>
		  <td data-title="Arbitrary Data">3451</td>
		  <td data-title="First Name">Captain</td>
		  <td data-title="Last Name">Cool</td>
		  <td data-title="Job Title">Tree Crusher</td>
		  <td data-title="Favorite Color">Blue</td>
		  <td data-title="Wars or Trek?">Wars</td>
		  <td data-title="Date of Birth">December 13, 1982</td>
		  <td data-title="Dream Vacation City">Las Vegas</td>
		  <td data-title="GPA">1.9</td>
		  <td data-title="Arbitrary Data">Under the couch</td>

              table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: #222;
  margin: 0;

caption {
  font-variant: small-caps;

td {
  line-height: 1.5em;
  vertical-align: top;
  padding: 12px 10px;

th *:first-child,
td *:first-child {
  margin-top: 0;
thead th {
  text-align: left;
  color: #000;
  border-bottom: 2px #000 solid;

tbody th, td {
  text-align: left;
  border-top: 1px solid #ccc;

tbody tr:hover th,
tbody tr:hover td {
  background: #f8f8f8;

tfoot {
  border-top: 4px solid #ccc;

	Max width before this PARTICULAR table gets nasty
	This query will take effect for any screen smaller than 760px
	and also iPads specifically.
	only screen and (max-width: 760px),
	(min-device-width: 768px) and (max-device-width: 1024px)  {
		/* Force table to not be like tables anymore */
		table, thead, tbody, th, td, tr { 
			display: block; 
		/* Hide table headers (but not display: none;, for accessibility) */
		thead { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		tr { border: 1px solid #ccc; margin-bottom: 20px;}
		td { 
			/* Behave  like a "row" */
			border: none;
/*			border-bottom: 1px solid #eee; */
			position: relative;
		td:before { 
  		/* Label the data */
      content: attr(data-title);
      display: inline-block;
			width: 35%; 
			padding-right: 10px; 
			white-space: nowrap;
	/* Smartphones (portrait and landscape) ----------- */
	@media only screen
	and (min-device-width : 320px)
	and (max-device-width : 480px) {
		body { 
			padding: 0; 
			margin: 0; 
			width: 320px; 
    td {padding-left: 45%;}
    td:before {width: 40%;}

	/* iPads (portrait and landscape) ----------- */
	@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
		body { 
			width: 495px; 
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................