Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <table>
    <tbody>
       <tr><td style="background: green; ">INFIBEAM<br/><div class="per">11.25%<div></td><td style="background: #038700; ">ADANIPOWER<br/><div class="per">5.79%<div></td><td style="background: #078e00; ">BPCL<br/><div class="per">3.83%<div></td><td style="background: #0b9500; ">CGPOWER<br/><div class="per">3.29%<div></td><td style="background: #0f9b00; ">NTPC<br/><div class="per">3.05%<div></td><td style="background: #13a200; ">GAIL<br/><div class="per">2.94%<div></td><td style="background: #18a900; ">PFC<br/><div class="per">2.93%<div></td><td style="background: #1db000; ">POWERGRID<br/><div class="per">2.77%<div></td><td style="background: #23b700; ">DISHTV<br/><div class="per">2.48%<div></td><td style="background: #29be00; ">INFRATEL<br/><div class="per">2.44%<div></td><td style="background: #2fc500; ">NBCC<br/><div class="per">2.35%<div></td><td style="background: #35cc00; ">ONGC<br/><div class="per">2.23%<div></td><td style="background: #3cd200; ">RECLTD<br/><div class="per">2.16%<div></td></tr>
<tr><td style="background: #43d900; ">TATAPOWER<br/><div class="per">2.15%<div></td><td style="background: #4be000; ">JETAIRWAYS<br/><div class="per">1.99%<div></td><td style="background: #52e700; ">RELIANCE<br/><div class="per">1.95%<div></td><td style="background: #5aee00; ">OIL<br/><div class="per">1.85%<div></td><td style="background: #63f500; ">LT<br/><div class="per">1.82%<div></td><td style="background: #6cfc00; ">INDIACEM<br/><div class="per">1.51%<div></td><td style="background: #75ff03; ">TATAMOTORS<br/><div class="per">1.47%<div></td><td style="background: #7fff0a; ">GMRINFRA<br/><div class="per">1.35%<div></td><td style="background: #8f1; ">EICHERMOT<br/><div class="per">1.32%<div></td><td style="background: #91ff18; ">BHARTIARTL<br/><div class="per">1.21%<div></td><td style="background: #99ff1f; ">VOLTAS<br/><div class="per">1.18%<div></td><td style="background: #a2ff26; ">TORNTPOWER<br/><div class="per">1.09%<div></td><td style="background: #aaff2d; ">BEL<br/><div class="per">0.94%<div></td></tr>
<tr><td style="background: #b1ff34; ">NHPC<br/><div class="per">0.85%<div></td><td style="background: #b8ff3a; ">IOC<br/><div class="per">0.76%<div></td><td style="background: #bfff41; ">ITC<br/><div class="per">0.63%<div></td><td style="background: #c6ff48; ">NATIONALUM<br/><div class="per">0.62%<div></td><td style="background: #ccff4f; ">PTC<br/><div class="per">0.61%<div></td><td style="background: #d2ff56; ">BAJAJFINSV<br/><div class="per">0.57%<div></td><td style="background: #d8ff5d; ">RELCAPITAL<br/><div class="per">0.47%<div></td><td style="background: #ddff64; ">PVR<br/><div class="per">0.37%<div></td><td style="background: #e2ff6a; ">HINDZINC<br/><div class="per">0.32%<div></td><td style="background: #e7ff71; ">INFY<br/><div class="per">0.27%<div></td><td style="background: #ebff78; ">WIPRO<br/><div class="per">0.27%<div></td><td style="background: #efff7f; ">MFSL<br/><div class="per">0.25%<div></td><td style="background: #f3ff86; ">ASIANPAINT<br/><div class="per">0.13%<div></td></tr>
<tr><td style="background: #f7ff8d; ">TATAMTRDVR<br/><div class="per">0.12%<div></td><td style="background: #faff94; ">BATAINDIA<br/><div class="per">0.09%<div></td><td style="background: #fcff9b; ">ADANIENT<br/><div class="per">0.08%<div></td><td style="background: #ffffa1; ">AMARAJABAT<br/><div class="per">0.08%<div></td><td style="background: #fffda8; ">ADANIPORTS<br/><div class="per">0.03%<div></td><td style="background: #fffbaf; ">TORNTPHARM<br/><div class="per">0.02%<div></td><td style="background: #fffab6; ">IGL<br/><div class="per">0.0%<div></td><td style="background: #fffab6; ">BOSCHLTD<br/><div class="per">-0.04%<div></td><td style="background: #fff9b5; ">RAMCOCEM<br/><div class="per">-0.05%<div></td><td style="background: #fff9b4; ">OFSS<br/><div class="per">-0.06%<div></td><td style="background: #fff8b2; ">BAJAJ-AUTO<br/><div class="per">-0.07%<div></td><td style="background: #fff8b1; ">SHREECEM<br/><div class="per">-0.13%<div></td><td style="background: #fff7b0; ">VGUARD<br/><div class="per">-0.13%<div></td></tr>
<tr><td style="background: #fff7af; ">HCLTECH<br/><div class="per">-0.18%<div></td><td style="background: #fff6ae; ">CIPLA<br/><div class="per">-0.18%<div></td><td style="background: #fff5ac; ">APOLLOHOSP<br/><div class="per">-0.22%<div></td><td style="background: #fff5ab; ">FEDERALBNK<br/><div class="per">-0.25%<div></td><td style="background: #fff4aa; ">MINDTREE<br/><div class="per">-0.26%<div></td><td style="background: #fff3a9; ">MGL<br/><div class="per">-0.27%<div></td><td style="background: #fff3a8; ">AMBUJACEM<br/><div class="per">-0.29%<div></td><td style="background: #fff2a7; ">KOTAKBANK<br/><div class="per">-0.3%<div></td><td style="background: #fff1a5; ">UPL<br/><div class="per">-0.33%<div></td><td style="background: #fff0a4; ">TITAN<br/><div class="per">-0.36%<div></td><td style="background: #fff0a3; ">ICICIBANK<br/><div class="per">-0.39%<div></td><td style="background: #ffefa2; ">CASTROLIND<br/><div class="per">-0.44%<div></td><td style="background: #ffeea1; ">HDFCBANK<br/><div class="per">-0.45%<div></td></tr>
<tr><td style="background: #ffed9f; ">COALINDIA<br/><div class="per">-0.46%<div></td><td style="background: #ffed9e; ">TECHM<br/><div class="per">-0.47%<div></td><td style="background: #ffec9d; ">TCS<br/><div class="per">-0.49%<div></td><td style="background: #ffeb9c; ">CHOLAFIN<br/><div class="per">-0.52%<div></td><td style="background: #ffea9b; ">CESC<br/><div class="per">-0.54%<div></td><td style="background: #ffe999; ">KSCL<br/><div class="per">-0.62%<div></td><td style="background: #ffe898; ">JISLJALEQS<br/><div class="per">-0.63%<div></td><td style="background: #ffe797; ">HINDUNILVR<br/><div class="per">-0.68%<div></td><td style="background: #ffe796; ">RBLBANK<br/><div class="per">-0.73%<div></td><td style="background: #ffe695; ">ICICIPRULI<br/><div class="per">-0.75%<div></td><td style="background: #ffe594; ">TATACOMM<br/><div class="per">-0.8%<div></td><td style="background: #ffe492; ">PCJEWELLER<br/><div class="per">-0.81%<div></td><td style="background: #ffe391; ">INDUSINDBK<br/><div class="per">-0.82%<div></td></tr>
<tr><td style="background: #ffe290; ">ESCORTS<br/><div class="per">-0.83%<div></td><td style="background: #ffe18f; ">ACC<br/><div class="per">-0.87%<div></td><td style="background: #ffe08e; ">IDFCFIRSTB<br/><div class="per">-0.89%<div></td><td style="background: #ffdf8c; ">JUBLFOOD<br/><div class="per">-0.95%<div></td><td style="background: #ffde8b; ">AJANTPHARM<br/><div class="per">-0.95%<div></td><td style="background: #ffdd8a; ">IDFC<br/><div class="per">-0.99%<div></td><td style="background: #ffdc89; ">BHARATFIN<br/><div class="per">-1.03%<div></td><td style="background: #ffda88; ">HAVELLS<br/><div class="per">-1.03%<div></td><td style="background: #ffd986; ">DIVISLAB<br/><div class="per">-1.03%<div></td><td style="background: #ffd885; ">BALKRISIND<br/><div class="per">-0.83%<div></td><td style="background: #ffd784; ">M&M<br/><div class="per">-1.08%<div></td><td style="background: #ffd683; ">IDBI<br/><div class="per">-1.11%<div></td><td style="background: #ffd582; ">CEATLTD<br/><div class="per">-1.14%<div></td></tr>
<tr><td style="background: #ffd480; ">ZEEL<br/><div class="per">-1.17%<div></td><td style="background: #ffd27f; ">APOLLOTYRE<br/><div class="per">-1.18%<div></td><td style="background: #ffd17e; ">HDFC<br/><div class="per">-1.23%<div></td><td style="background: #ffd07d; ">MRPL<br/><div class="per">-1.24%<div></td><td style="background: #ffcf7c; ">NESTLEIND<br/><div class="per">-1.26%<div></td><td style="background: #ffce7b; ">INDIGO<br/><div class="per">-1.28%<div></td><td style="background: #ffcc79; ">ULTRACEMCO<br/><div class="per">-1.32%<div></td><td style="background: #ffcb78; ">BERGEPAINT<br/><div class="per">-1.32%<div></td><td style="background: #ffca77; ">COLPAL<br/><div class="per">-1.33%<div></td><td style="background: #ffc876; ">CONCOR<br/><div class="per">-1.35%<div></td><td style="background: #ffc775; ">EXIDEIND<br/><div class="per">-1.37%<div></td><td style="background: #ffc673; ">NMDC<br/><div class="per">-1.4%<div></td><td style="background: #ffc472; ">AXISBANK<br/><div class="per">-1.4%<div></td></tr>
<tr><td style="background: #ffc371; ">L&TFH<br/><div class="per">-1.41%<div></td><td style="background: #ffc270; ">CADILAHC<br/><div class="per">-1.41%<div></td><td style="background: #ffc06f; ">MARUTI<br/><div class="per">-1.46%<div></td><td style="background: #ffbf6d; ">MARICO<br/><div class="per">-1.52%<div></td><td style="background: #ffbe6c; ">DABUR<br/><div class="per">-1.54%<div></td><td style="background: #ffbc6b; ">SBIN<br/><div class="per">-1.61%<div></td><td style="background: #ffbb6a; ">KAJARIACER<br/><div class="per">-1.66%<div></td><td style="background: #ffb969; ">PETRONET<br/><div class="per">-1.66%<div></td><td style="background: #ffb867; ">PIDILITIND<br/><div class="per">-1.68%<div></td><td style="background: #ffb666; ">YESBANK<br/><div class="per">-1.72%<div></td><td style="background: #ffb565; ">EQUITAS<br/><div class="per">-1.77%<div></td><td style="background: #ffb364; ">MCX<br/><div class="per">-1.78%<div></td><td style="background: #ffb263; ">GRASIM<br/><div class="per">-1.79%<div></td></tr>
<tr><td style="background: #ffb062; ">RCOM<br/><div class="per">-1.8%<div></td><td style="background: #ffaf60; ">CUMMINSIND<br/><div class="per">-0.84%<div></td><td style="background: #ffad5f; ">MUTHOOTFIN<br/><div class="per">-1.83%<div></td><td style="background: #ffab5e; ">BEML<br/><div class="per">-1.85%<div></td><td style="background: #ffaa5d; ">TATAGLOBAL<br/><div class="per">-1.85%<div></td><td style="background: #ffa85c; ">BAJFINANCE<br/><div class="per">-1.89%<div></td><td style="background: #ffa75a; ">SOUTHBANK<br/><div class="per">-1.89%<div></td><td style="background: #ffa559; ">MRF<br/><div class="per">-2.0%<div></td><td style="background: #ffa358; ">TATACHEM<br/><div class="per">-2.06%<div></td><td style="background: #ffa257; ">HINDPETRO<br/><div class="per">-2.06%<div></td><td style="background: #ffa056; ">LICHSGFIN<br/><div class="per">-2.07%<div></td><td style="background: #ff9e54; ">BHEL<br/><div class="per">-2.09%<div></td><td style="background: #ff9c53; ">SRF<br/><div class="per">-2.11%<div></td></tr>
<tr><td style="background: #ff9b52; ">STAR<br/><div class="per">-2.16%<div></td><td style="background: #ff9951; ">GODREJIND<br/><div class="per">-2.21%<div></td><td style="background: #ff9750; ">GODFRYPHLP<br/><div class="per">-2.22%<div></td><td style="background: #ff954f; ">BRITANNIA<br/><div class="per">-2.24%<div></td><td style="background: #ff944d; ">BHARATFORG<br/><div class="per">-2.25%<div></td><td style="background: #ff924c; ">IFCI<br/><div class="per">-2.41%<div></td><td style="background: #ff904b; ">IRB<br/><div class="per">-2.43%<div></td><td style="background: #ff8e4a; ">HEXAWARE<br/><div class="per">-2.51%<div></td><td style="background: #ff8c49; ">PEL<br/><div class="per">-2.52%<div></td><td style="background: #ff8a47; ">DLF<br/><div class="per">-2.59%<div></td><td style="background: #ff8946; ">TATAELXSI<br/><div class="per">-2.59%<div></td><td style="background: #ff8745; ">SIEMENS<br/><div class="per">-2.63%<div></td><td style="background: #ff8544; ">BANKBARODA<br/><div class="per">-2.7%<div></td></tr>
<tr><td style="background: #ff8343; ">KTKBANK<br/><div class="per">-2.7%<div></td><td style="background: #ff8141; ">MCDOWELL-N<br/><div class="per">-2.74%<div></td><td style="background: #ff7f40; ">VEDL<br/><div class="per">-2.77%<div></td><td style="background: #ff7d3f; ">RAYMOND<br/><div class="per">-2.77%<div></td><td style="background: #ff7b3e; ">GODREJCP<br/><div class="per">-2.79%<div></td><td style="background: #ff793d; ">PNB<br/><div class="per">-2.84%<div></td><td style="background: #ff773b; ">RELINFRA<br/><div class="per">-2.85%<div></td><td style="background: #ff753a; ">SUZLON<br/><div class="per">-2.86%<div></td><td style="background: #ff7339; ">HINDALCO<br/><div class="per">-2.89%<div></td><td style="background: #ff7138; ">SAIL<br/><div class="per">-2.92%<div></td><td style="background: #ff6f37; ">M&MFIN<br/><div class="per">-2.98%<div></td><td style="background: #ff6d36; ">NCC<br/><div class="per">-3.0%<div></td><td style="background: #ff6b34; ">NIITTECH<br/><div class="per">-3.05%<div></td></tr>
<tr><td style="background: #ff6933; ">IBULHSGFIN<br/><div class="per">-3.11%<div></td><td style="background: #ff6632; ">JINDALSTEL<br/><div class="per">-3.12%<div></td><td style="background: #ff6431; ">TATASTEEL<br/><div class="per">-3.17%<div></td><td style="background: #ff6230; ">TVSMOTOR<br/><div class="per">-3.17%<div></td><td style="background: #ff602e; ">DCBBANK<br/><div class="per">-3.19%<div></td><td style="background: #ff5e2d; ">HEROMOTOCO<br/><div class="per">-3.21%<div></td><td style="background: #ff5c2c; ">WOCKPHARMA<br/><div class="per">-3.23%<div></td><td style="background: #ff592b; ">BANKINDIA<br/><div class="per">-3.26%<div></td><td style="background: #ff572a; ">CENTURYTEX<br/><div class="per">-3.29%<div></td><td style="background: #ff5528; ">MANAPPURAM<br/><div class="per">-2.79%<div></td><td style="background: #ff5327; ">GSFC<br/><div class="per">-3.31%<div></td><td style="background: #ff5026; ">JUSTDIAL<br/><div class="per">-3.51%<div></td><td style="background: #ff4e25; ">AUROPHARMA<br/><div class="per">-3.41%<div></td></tr>
<tr><td style="background: #ff4c24; ">MOTHERSUMI<br/><div class="per">-3.73%<div></td><td style="background: #ff4922; ">UJJIVAN<br/><div class="per">-3.74%<div></td><td style="background: #ff4721; ">UNIONBANK<br/><div class="per">-3.74%<div></td><td style="background: #ff4520; ">CHENNPETRO<br/><div class="per">-3.75%<div></td><td style="background: #ff421f; ">JPASSOCIAT<br/><div class="per">-3.85%<div></td><td style="background: #ff401e; ">SYNDIBANK<br/><div class="per">-3.86%<div></td><td style="background: #ff3e1d; ">TV18BRDCST<br/><div class="per">-3.86%<div></td><td style="background: #ff3b1b; ">BIOCON<br/><div class="per">-3.9%<div></td><td style="background: #ff391a; ">KPIT<br/><div class="per">-3.94%<div></td><td style="background: #ff3619; ">CANBK<br/><div class="per">-3.96%<div></td><td style="background: #ff3418; ">ENGINERSIN<br/><div class="per">-1.14%<div></td><td style="background: #ff3117; ">SUNPHARMA<br/><div class="per">-4.06%<div></td><td style="background: #ff2f15; ">DRREDDY<br/><div class="per">-4.17%<div></td></tr>
<tr><td style="background: #ff2d14; ">REPCOHOME<br/><div class="per">-4.21%<div></td><td style="background: #ff2a13; ">SRTRANSFIN<br/><div class="per">-4.34%<div></td><td style="background: #ff2812; ">DHFL<br/><div class="per">-4.42%<div></td><td style="background: #ff2511; ">ALBK<br/><div class="per">-4.45%<div></td><td style="background: #ff220f; ">LUPIN<br/><div class="per">-4.47%<div></td><td style="background: #ff200e; ">ARVIND<br/><div class="per">-4.5%<div></td><td style="background: #ff1d0d; ">ORIENTBANK<br/><div class="per">-4.6%<div></td><td style="background: #ff1b0c; ">JSWSTEEL<br/><div class="per">-4.99%<div></td><td style="background: #ff180b; ">IDEA<br/><div class="per">-5.21%<div></td><td style="background: #ff150a; ">SUNTV<br/><div class="per">-4.81%<div></td><td style="background: #ff1308; ">UBL<br/><div class="per">-5.25%<div></td><td style="background: #ff1007; ">ASHOKLEY<br/><div class="per">-5.62%<div></td><td style="background: #ff0e06; ">RPOWER<br/><div class="per">-5.63%<div></td></tr>
<tr><td style="background: #ff0b05; ">GLENMARK<br/><div class="per">-6.47%<div></td><td style="background: #ff0804; ">CANFINHOME<br/><div class="per">-6.71%<div></td><td style="background: #ff0502; ">SREINFRA<br/><div class="per">-7.37%<div></td><td style="background: #ff0301; ">INDIANB<br/><div class="per">-8.22%<div></td><td style="background: red; ">PAGEIND<br/><div class="per">-9.0%<div></td></tr>
    </tbody>
       </table>Last Updated at 23:46:53.241854.
              
            
!

CSS

              
                table { 
	width: 1000px; 
	border-collapse: collapse; 
	margin:50px auto;  
	}

div.per{
  padding: 5px 0 5px 0; 
  font-size: 13px;
}

td{
  font-family: 'Helvetica Neue', Helvetica, Arial;
  font-size: 13px;
  font-weight:bold;
  text-transform: uppercase;
  color: black;
  text-align: center;
	padding: 5px 0 5px 0; 
	border: 1px 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.
*/
@media 
only screen and (max-width: 460px),
(min-device-width: 768px) and (max-device-width: 1024px)  {

	table { 
	  	width: 100%; 
	}

	/* 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) */
		
	tr { border: 1px solid #ccc; }
	
	td { 
		/* Behave  like a "row" */
		border: none;
		border-bottom: 1px solid #eee; 
		position: relative;
		padding-left: 50%; 
	}

}
              
            
!

JS

              
                
              
            
!
999px

Console