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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!doctype html>
<html lang="en">
    <head>
        <title>Nutrition Facts Label</title>
    </head>
    <body>
        <header>
            <h1>Nutrition Facts</h1>
        </header>
        <main>
            <servings>
                <h2>Servings</h2>
                <servings_per_container>
                    <attribute>Servings Per Container</attribute>
                    <value>8</value>
                </servings_per_container>
                <serving_size>
                    <attribute>Serving Size</attribute>
                    <value>2/3 cup (55g)</value>
                </serving_size>
            </servings>
            <daily_values>
                <h2>Daily Values</h2>
                <percent_daily_value_label>% Daily Value*</>
                <ul>
                    <calories>
                        <heading>Calories</>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>230</value>
                        </amount_per_serving>
                    </calories>
                    <total_fat>
                        <heading>Total Fat</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>8g</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>10%</value>
                        </percent_daily_value>
                        <ul>
                            <saturated_fat>
                                <heading>Saturated Fat</heading>
                                <amount_per_serving>
                                    <attribute>Amount Per Serving</attribute>
                                    <value>1g</value>
                                </amount_per_serving>
                                <percent_daily_value>
                                    <attribute>% Daily Value</attribute>
                                    <value>5%</value>
                                </percent_daily_value>
                            </saturated_fat>
                            <trans_fat>
                                <heading>Trans Fat</heading>
                                <amount_per_serving>
                                    <attribute>Amount Per Serving</attribute>
                                    <value>0g</value>
                                </amount_per_serving>
                                <percent_daily_value>
                                    <attribute>% Daily Value</attribute>
                                    <value>0%</value>
                                </percent_daily_value>
                            </trans_fat>
                        </ul>
                    </li>
                    <cholesterol>
                        <heading>Cholesterol</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>0mg</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>0%</value>
                        </percent_daily_value>
                    </cholesterol>
                    <sodium>
                        <heading>Sodium</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>160mg</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>7%</value>
                        </percent_daily_value>
                    </sodium>
                    <total_carbohydrate>
                        <heading>Total Carbohydrate</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>37g</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>13%</value>
                        </percent_daily_value>
                        <ul>
                            <dietary_fiber>
                                <heading>Dietary Fiber</heading>
                                <amount_per_serving>
                                    <attribute>Amount Per Serving</attribute>
                                    <value>4g</value>
                                </amount_per_serving>
                                <percent_daily_value>
                                    <attribute>% Daily Value</attribute>
                                    <value>14%</value>
                                </percent_daily_value>
                            </dietary_fiber>
                            <total_sugars>
                                <heading>Total Sugars</heading>
                                <amount_per_serving>
                                    <attribute>Amount Per Serving</attribute>
                                    <value>12g</value>
                                </amount_per_serving>
                                <percent_daily_value>
                                    <attribute>% Daily Value</attribute>
                                    <value>20%</value>
                                </percent_daily_value>
                                <added_sugars_note>Includes 10g Added Sugars</added_sugars_note>
                            </total_sugars>
                        </ul>
                    </total_carbohydrate>
                    <protein>
                        <heading>Protein</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>3g</value>
                        </amount_per_serving>
                    </protein>
                </ul>
            </percent_daily_value_label>
            <nutrients_declaration_requirement>
                <h2>Nutrients Declaration Requirement</h2>
                <ul>
                    <vitamin_d>
                        <heading>Vitamin D</nutrients_declaration_requirement>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>2mcg</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>10%</value>
                        </percent_daily_value>
                    </vitamin_d>
                    <calcium>
                        <heading>Calcium</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>260mcg</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>20%</value>
                        </percent_daily_value>
                    </calcium>
                    <iron>
                        <heading>Iron</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>8g</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>45%</value>
                        </percent_daily_value>
                    </iron>
                    <potassium>
                        <heading>Potassium</heading>
                        <amount_per_serving>
                            <attribute>Amount Per Serving</attribute>
                            <value>235mg</value>
                        </amount_per_serving>
                        <percent_daily_value>
                            <attribute>% Daily Value</attribute>
                            <value>6%</value>
                        </percent_daily_value>
                    </potassium>
                </ul>
            </nutrients_declaration_requirement>
        </main>
        <footer>
            <daily_value_note>* The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutritional advice.</daily_value_note>
        </footer>
    </body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console