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

              
                <div class="container">
	<div class="row">
		<div class="col-md-12">
			<h1>Collapsible tabs (Bootstrap accordion) easy to use plugin</h1><hr>
		</div>
		
		<div class="col-md-12">
			<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="headingOne">
						<h4 class="panel-title">
						<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
						Vegetables calories chart
						</a>
						</h4>
					</div>
					<div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
						<div class="panel-body">
							<p>No doubt about it, vegetables should be a regular part of everyone’s diet. One glance at this calorie chart, and it’s easy to see why. A large portion of vegetables won’t contain very many calories, and yet it will include a wonderful dose of vitamins, minerals, and other nutrients. Vegetables contain a mix of carbohydrates along with smaller amounts of healthy fats and protein.</p>
							<table class="table table-striped"> 
								<thead> 
									<tr> 
										<th>#</th> 
										<th>Vegetable</th> 
										<th>Serving</th> 
										<th>Calories</th> 
										<th>Kilojoule</th> 
									</tr> 
								</thead> 
								<tbody> 
									<tr> 
										<th scope="row">#VEG1201</th> 
										<td>Artichoke</td> 
										<td>1 artichoke (128g)</td> 
										<td>60 cal</td> 
										<td>252 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#VEG1202</th> 
										<td>Broccoli</td> 
										<td>1 bunch (608g)</td> 
										<td>207 cal</td> 
										<td>869 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#VEG1203</th> 
										<td>Potato</td> 
										<td>1 potato (213g)</td> 
										<td>164 cal</td> 
										<td>688 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#VEG1204</th> 
										<td>Gourd</td> 
										<td>1 gourd (771g)</td> 
										<td>108 cal</td> 
										<td>455 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#VEG1205</th> 
										<td>Cucumber</td> 
										<td>1 Cucumber (410g)</td> 
										<td>66 cal</td> 
										<td>275 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#VEG1206</th> 
										<td>Mushrooms</td> 
										<td>1 mushroom (5.4g)</td> 
										<td>1 cal</td> 
										<td>5 kJ</td> 
									</tr> 
								</tbody> 
							</table>
						</div>
					</div>
				</div>
				
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="headingTwo">
						<h4 class="panel-title">
						<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
						Fruits calories chart
						</a>
						</h4>
					</div>
					<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
						<div class="panel-body">
							<p>All fruits are mostly made of carbohydrates, although calories in fruit can also come from fats and small amounts of protein. The carbs, however, are not all the same and are usually a mix of complex carbohydrates (i.e., made of three or more bonded sugars) and simple carbohydrates (i.e., simple sugars).</p>
							<table class="table table-striped"> 
								<thead> 
									<tr> 
										<th>#</th> 
										<th>Fruit</th> 
										<th>Serving</th> 
										<th>Calories</th> 
										<th>Kilojoule</th> 
									</tr> 
								</thead> 
								<tbody> 
									<tr> 
										<th scope="row">#FRU1201</th> 
										<td>Pineapple</td> 
										<td>1 pineapple (905g)</td> 
										<td>453 cal</td> 
										<td>1901 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#FRU1202</th> 
										<td>Raisins</td> 
										<td>1 cup (145g)</td> 
										<td>434 cal</td> 
										<td>1821 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#FRU1203</th> 
										<td>Pomegranate</td> 
										<td>1 pomegranate (283g)</td> 
										<td>234 cal</td> 
										<td>984 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#FRU1204</th> 
										<td>Mango</td> 
										<td>1 mango (336g)</td> 
										<td>201 cal</td> 
										<td>849 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#FRU1205</th> 
										<td>Grapes</td> 
										<td>1 cup (151g)</td> 
										<td>107 cal</td> 
										<td>439 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#FRU1206</th> 
										<td>Apricot</td> 
										<td>1 apricot (35g)</td> 
										<td>17 cal</td> 
										<td>71 kJ</td> 
									</tr> 
								</tbody> 
							</table>
						</div>
					</div>
				</div>
				
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="headingThree">
						<h4 class="panel-title">
						<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
						Nuts and seeds calories chart
						</a>
						</h4>
					</div>
					<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
						<div class="panel-body">
							<p>Nuts and seeds contain a high amount of calories considering they are such small foods and are consumed in small portions. Most ingredients in this category are primarily composed of fats, along with varying degrees of protein and carbohydrates. Tree nuts like almonds and edible seeds like from the chia plant are among the best whole food sources of omega-3 fats. </p>
							<table class="table table-striped"> 
								<thead> 
									<tr> 
										<th>#</th> 
										<th>Nuts/Seeds</th> 
										<th>Serving</th> 
										<th>Calories</th> 
										<th>Kilojoule</th> 
									</tr> 
								</thead> 
								<tbody> 
									<tr> 
										<th scope="row">#NAS1201</th> 
										<td>Coconut</td> 
										<td>1 coconut (397g)</td> 
										<td>1405 cal</td> 
										<td>5903 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#NAS1202</th> 
										<td>Pine Nuts</td> 
										<td>1 cup (146g)</td> 
										<td>828 cal</td> 
										<td>3476 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#NAS1203</th> 
										<td>Almonds</td> 
										<td>1 cup (95g)</td> 
										<td>546 cal</td> 
										<td>2294 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#NAS1204</th> 
										<td>Cashew</td> 
										<td>1 oz. (28.35g)</td> 
										<td>155 cal</td> 
										<td>652 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#NAS1205</th> 
										<td>Poppy Seeds</td> 
										<td>1 spoon (30g)</td> 
										<td>42 cal</td> 
										<td>179 kJ</td> 
									</tr> 
									<tr> 
										<th scope="row">#NAS1206</th> 
										<td>Radish Seeds</td> 
										<td>1 cup (38g)</td> 
										<td>16 cal</td> 
										<td>69 kJ</td> 
									</tr> 
								</tbody> 
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="col-md-12">
			<p style="font-style: italic; color: #2196f3; font-size: 18px; text-align: center; margin-top: 50px; margin-bottom: 20px;">Follow me on Twitter: <a href="https://twitter.com/mrdogra007/" target="_blank">@mrdogra007</a></p>
		</div>
	</div>
</div>
		
              
            
!

CSS

              
                h1 { font-size: 26px; text-align: center; margin-top: 40px; margin-bottom: 20px;}
.panel-default>.panel-heading { /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#2340ff+1,7c21f5+100 */
background: #2340ff; /* Old browsers */
background: -moz-linear-gradient(-45deg, #2340ff 1%, #7c21f5 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(-45deg, #2340ff 1%,#7c21f5 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(135deg, #2340ff 1%,#7c21f5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2340ff', endColorstr='#7c21f5',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
color: #ffffff; padding: 18px;}
.panel { box-shadow: 0px 0px 60px 0px rgba( 0, 0, 0, .40 );}
.panel-group .panel { margin-bottom: 20px; border: 1px solid #2340ff; 
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#2340ff+1,7c21f5+100 */
border-color: #2340ff; /* Old browsers */
border-color: -moz-linear-gradient(-45deg, #2340ff 1%, #7c21f5 100%); /* FF3.6-15 */
border-color: -webkit-linear-gradient(-45deg, #2340ff 1%,#7c21f5 100%); /* Chrome10-25,Safari5.1-6 */
border-color: linear-gradient(135deg, #2340ff 1%,#7c21f5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2340ff', endColorstr='#7c21f5',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */}
.panel-title { font-size: 18px;}
.panel-title a, .panel-title a:hover, .panel-title a:focus { text-decoration: none;}
.panel-body p { font-size: 16px;}
              
            
!

JS

              
                // Collapsible tabs (Bootstrap accordion) 
// Deigned by Nishant Dogra
// Date: 07/12/2017
// Twitter: @mrdogra007
// Blog: https://t.co/F6RF2rCHu3
              
            
!
999px

Console