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

              
                <main>
  <div class="table-wrapper">
    <table>
      <thead>
        <tr>
          <th data-type="text" scope="col" role="columnheader">name</th>
          <th data-type="text" scope="col" role="columnheader">code</th>
          <th data-type="text" scope="col" role="columnheader">emoji</th>
          <th data-type="text" scope="col" role="columnheader">category</th>
          <th data-type="text" scope="col" role="columnheader">cldr short name</th>
          <th data-type="text" scope="col" role="columnheader">alt names</th>
          <th data-type="number" scope="col" role="columnheader">emoji version</th>
          <th data-type="number" scope="col" role="columnheader">unicode version</th>
        </tr>
      </thead>
      <tbody id="tableData">
        <tr>
          <td>grapes</td>
          <td>U+1F347</td>
          <td>๐Ÿ‡</td>
          <td>fruit</td>
          <td>grapes</td>
          <td>grape</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>melon</td>
          <td>U+1F348</td>
          <td>๐Ÿˆ</td>
          <td>fruit</td>
          <td>melon</td>
          <td>cantaloupe, honeydew, muskmelon</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>watermelon</td>
          <td>U+1F349</td>
          <td>๐Ÿ‰</td>
          <td>fruit</td>
          <td>watermelon</td>
          <td> </td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>tangerine</td>
          <td>U+1F34A</td>
          <td>๐ŸŠ</td>
          <td>fruit</td>
          <td>tangerine</td>
          <td>mandarin, orange</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>lemon</td>
          <td>U+1F34B</td>
          <td>๐Ÿ‹</td>
          <td>fruit</td>
          <td>lemon</td>
          <td>lemonade</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>banana</td>
          <td>U+1F34C</td>
          <td>๐ŸŒ</td>
          <td>fruit</td>
          <td>banana</td>
          <td>plantain</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>pineapple</td>
          <td>U+1F34D</td>
          <td>๐Ÿ</td>
          <td>fruit</td>
          <td>pineapple</td>
          <td> </td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>mango</td>
          <td>U+1F96D</td>
          <td>๐Ÿฅญ</td>
          <td>fruit</td>
          <td>โŠ› mango</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>red apple</td>
          <td>U+1F34E</td>
          <td>๐ŸŽ</td>
          <td>fruit</td>
          <td>red apple</td>
          <td>red delicious apple</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>green apple</td>
          <td>U+1F34F</td>
          <td>๐Ÿ</td>
          <td>fruit</td>
          <td>green apple</td>
          <td>golden delicious apple, granny smith apple</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>pear</td>
          <td>U+1F350</td>
          <td>๐Ÿ</td>
          <td>fruit</td>
          <td>pear</td>
          <td> </td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>peach</td>
          <td>U+1F351</td>
          <td>๐Ÿ‘</td>
          <td>fruit</td>
          <td>peach</td>
          <td>bottom, butt</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>cherries</td>
          <td>U+1F352</td>
          <td>๐Ÿ’</td>
          <td>fruit</td>
          <td>cherries</td>
          <td>cherry, wild cherry</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>strawberry</td>
          <td>U+1F353</td>
          <td>๐Ÿ“</td>
          <td>fruit</td>
          <td>strawberry</td>
          <td> </td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>kiwifruit</td>
          <td>U+1F95D</td>
          <td>๐Ÿฅ</td>
          <td>fruit</td>
          <td>kiwi fruit</td>
          <td>chinese gooseberry, kiwi</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>tomato</td>
          <td>U+1F345</td>
          <td>๐Ÿ…</td>
          <td>fruit</td>
          <td>tomato</td>
          <td> </td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>coconut</td>
          <td>U+1F965</td>
          <td>๐Ÿฅฅ</td>
          <td>fruit</td>
          <td>coconut</td>
          <td>cocoanut</td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>avocado</td>
          <td>U+1F951</td>
          <td>๐Ÿฅ‘</td>
          <td>vegetable</td>
          <td>avocado</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>eggplant</td>
          <td>U+1F346</td>
          <td>๐Ÿ†</td>
          <td>vegetable</td>
          <td>eggplant</td>
          <td>eggplant, phallic, purple vegetable</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>potato</td>
          <td>U+1F954</td>
          <td>๐Ÿฅ”</td>
          <td>vegetable</td>
          <td>potato</td>
          <td>baked potato, idaho potato</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>carrot</td>
          <td>U+1F955</td>
          <td>๐Ÿฅ•</td>
          <td>vegetable</td>
          <td>carrot</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>corn</td>
          <td>U+1F33D</td>
          <td>๐ŸŒฝ</td>
          <td>vegetable</td>
          <td>ear of corn</td>
          <td>corn, corn on the cob</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>hot pepper</td>
          <td>U+1F336</td>
          <td>๐ŸŒถ</td>
          <td>vegetable</td>
          <td>hot pepper</td>
          <td>chili pepper, spicy</td>
          <td>1.0</td>
          <td>7.0</td>
        </tr>
        <tr>
          <td>cucumber</td>
          <td>U+1F952</td>
          <td>๐Ÿฅ’</td>
          <td>vegetable</td>
          <td>cucumber</td>
          <td>gherkin, pickle</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>leafy green</td>
          <td>U+1F96C</td>
          <td>๐Ÿฅฌ</td>
          <td>vegetable</td>
          <td>โŠ› leafy green</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>broccoli</td>
          <td>U+1F966</td>
          <td>๐Ÿฅฆ</td>
          <td>vegetable</td>
          <td>broccoli</td>
          <td> </td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>mushroom</td>
          <td>U+1F344</td>
          <td>๐Ÿ„</td>
          <td>vegetable</td>
          <td>mushroom</td>
          <td>shroom, toadstool</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>peanuts</td>
          <td>U+1F95C</td>
          <td>๐Ÿฅœ</td>
          <td>vegetable</td>
          <td>peanuts</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>chestnut</td>
          <td>U+1F330</td>
          <td>๐ŸŒฐ</td>
          <td>vegetable</td>
          <td>chestnut</td>
          <td>acorn, nut</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>bread</td>
          <td>U+1F35E</td>
          <td>๐Ÿž</td>
          <td>prepared</td>
          <td>bread</td>
          <td>loaf of bread</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>croissant</td>
          <td>U+1F950</td>
          <td>๐Ÿฅ</td>
          <td>prepared</td>
          <td>croissant</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>french bread</td>
          <td>U+1F956</td>
          <td>๐Ÿฅ–</td>
          <td>prepared</td>
          <td>baguette bread</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>pretzel</td>
          <td>U+1F968</td>
          <td>๐Ÿฅจ</td>
          <td>prepared</td>
          <td>pretzel</td>
          <td> </td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>bagel</td>
          <td>U+1F96F</td>
          <td>๐Ÿฅฏ</td>
          <td>prepared</td>
          <td>โŠ› bagel</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>pancakes</td>
          <td>U+1F95E</td>
          <td>๐Ÿฅž</td>
          <td>prepared</td>
          <td>pancakes</td>
          <td>crรชpes</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>cheese</td>
          <td>U+1F9C0</td>
          <td>๐Ÿง€</td>
          <td>prepared</td>
          <td>cheese wedge</td>
          <td>cheese</td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>beef</td>
          <td>U+1F356</td>
          <td>๐Ÿ–</td>
          <td>prepared</td>
          <td>meat on bone</td>
          <td>ano niku, barbecue, bbq, manga meat</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>chicken</td>
          <td>U+1F357</td>
          <td>๐Ÿ—</td>
          <td>prepared</td>
          <td>poultry leg</td>
          <td>chicken drumstick, turkey leg</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>steak</td>
          <td>U+1F969</td>
          <td>๐Ÿฅฉ</td>
          <td>prepared</td>
          <td>cut of meat</td>
          <td>steak</td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>bacon</td>
          <td>U+1F953</td>
          <td>๐Ÿฅ“</td>
          <td>prepared</td>
          <td>bacon</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>hamburger</td>
          <td>U+1F354</td>
          <td>๐Ÿ”</td>
          <td>prepared</td>
          <td>hamburger</td>
          <td>burger, cheeseburger</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>french fries</td>
          <td>U+1F35F</td>
          <td>๐ŸŸ</td>
          <td>prepared</td>
          <td>french fries</td>
          <td>fries, mcdonalds fries</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>pizza</td>
          <td>U+1F355</td>
          <td>๐Ÿ•</td>
          <td>prepared</td>
          <td>pizza</td>
          <td>pepperoni pizza, pizza</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>hotdog</td>
          <td>U+1F32D</td>
          <td>๐ŸŒญ</td>
          <td>prepared</td>
          <td>hot dog</td>
          <td>hotdog, sausage</td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>sandwich</td>
          <td>U+1F96A</td>
          <td>๐Ÿฅช</td>
          <td>prepared</td>
          <td>sandwich</td>
          <td> </td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>taco</td>
          <td>U+1F32E</td>
          <td>๐ŸŒฎ</td>
          <td>prepared</td>
          <td>taco</td>
          <td> </td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>burrito</td>
          <td>U+1F32F</td>
          <td>๐ŸŒฏ</td>
          <td>prepared</td>
          <td>burrito</td>
          <td>wrap</td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>pita pocket</td>
          <td>U+1F959</td>
          <td>๐Ÿฅ™</td>
          <td>prepared</td>
          <td>stuffed flatbread</td>
          <td>doner kebab, shawarma, souvlaki</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>egg</td>
          <td>U+1F95A</td>
          <td>๐Ÿฅš</td>
          <td>prepared</td>
          <td>egg</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>fried egg</td>
          <td>U+1F373</td>
          <td>๐Ÿณ</td>
          <td>prepared</td>
          <td>cooking</td>
          <td>breakfast, fried egg, frying pan</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>casserole</td>
          <td>U+1F958</td>
          <td>๐Ÿฅ˜</td>
          <td>prepared</td>
          <td>shallow pan of food</td>
          <td>paella</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>stew</td>
          <td>U+1F372</td>
          <td>๐Ÿฒ</td>
          <td>prepared</td>
          <td>pot of food</td>
          <td>bowl of food</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>soup</td>
          <td>U+1F963</td>
          <td>๐Ÿฅฃ</td>
          <td>prepared</td>
          <td>bowl with spoon</td>
          <td>cereal bowl</td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>salad</td>
          <td>U+1F957</td>
          <td>๐Ÿฅ—</td>
          <td>prepared</td>
          <td>green salad</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>popcorn</td>
          <td>U+1F37F</td>
          <td>๐Ÿฟ</td>
          <td>prepared</td>
          <td>popcorn</td>
          <td>popping corn</td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>salt</td>
          <td>U+1F9C2</td>
          <td>๐Ÿง‚</td>
          <td>prepared</td>
          <td>โŠ› salt</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>canned soup</td>
          <td>U+1F96B</td>
          <td>๐Ÿฅซ</td>
          <td>prepared</td>
          <td>canned food</td>
          <td> </td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>bento box</td>
          <td>U+1F371</td>
          <td>๐Ÿฑ</td>
          <td>asian</td>
          <td>bento box</td>
          <td>lunch box</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>rice crackers</td>
          <td>U+1F358</td>
          <td>๐Ÿ˜</td>
          <td>asian</td>
          <td>rice cracker</td>
          <td> </td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>onigiri</td>
          <td>U+1F359</td>
          <td>๐Ÿ™</td>
          <td>asian</td>
          <td>rice ball</td>
          <td>nori, triangle rice</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>rice</td>
          <td>U+1F35A</td>
          <td>๐Ÿš</td>
          <td>asian</td>
          <td>cooked rice</td>
          <td>boiled rice, bowl of rice, rice, steamed rice</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>curry rice</td>
          <td>U+1F35B</td>
          <td>๐Ÿ›</td>
          <td>asian</td>
          <td>curry rice</td>
          <td>curry, indian food</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>noodles</td>
          <td>U+1F35C</td>
          <td>๐Ÿœ</td>
          <td>asian</td>
          <td>steaming bowl</td>
          <td>noodles, noodles with chopsticks, ramen</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>spaghetti</td>
          <td>U+1F35D</td>
          <td>๐Ÿ</td>
          <td>asian</td>
          <td>spaghetti</td>
          <td>pasta, spaghetti bolognese</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>sweet potato</td>
          <td>U+1F360</td>
          <td>๐Ÿ </td>
          <td>asian</td>
          <td>roasted sweet potato</td>
          <td>potato, sweet potato, yam</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>oden</td>
          <td>U+1F362</td>
          <td>๐Ÿข</td>
          <td>asian</td>
          <td>oden</td>
          <td>kebab, skewer</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>sushi</td>
          <td>U+1F363</td>
          <td>๐Ÿฃ</td>
          <td>asian</td>
          <td>sushi</td>
          <td>sashimi, seafood</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>fried shrimp</td>
          <td>U+1F364</td>
          <td>๐Ÿค</td>
          <td>asian</td>
          <td>fried shrimp</td>
          <td>ebi furai, fried prawn, tempura</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>fish cake</td>
          <td>U+1F365</td>
          <td>๐Ÿฅ</td>
          <td>asian</td>
          <td>fish cake with swirl</td>
          <td>fishcake, narutomaki, pink swirl</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>moon cake</td>
          <td>U+1F96E</td>
          <td>๐Ÿฅฎ</td>
          <td>asian</td>
          <td>โŠ› moon cake</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>dango</td>
          <td>U+1F361</td>
          <td>๐Ÿก</td>
          <td>asian</td>
          <td>dango</td>
          <td>dessert stick, pink white green balls</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>dumpling</td>
          <td>U+1F95F</td>
          <td>๐ŸฅŸ</td>
          <td>asian</td>
          <td>dumpling</td>
          <td>empanada, gyลza, pierogi</td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>fortune cookie</td>
          <td>U+1F960</td>
          <td>๐Ÿฅ </td>
          <td>asian</td>
          <td>fortune cookie</td>
          <td> </td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>chinese takeout</td>
          <td>U+1F961</td>
          <td>๐Ÿฅก</td>
          <td>asian</td>
          <td>takeout box</td>
          <td>chinese food box, oyster pail</td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>crab</td>
          <td>U+1F980</td>
          <td>๐Ÿฆ€</td>
          <td>marine</td>
          <td>crab</td>
          <td>crab cancer, red crab</td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>lobster</td>
          <td>U+1F99E</td>
          <td>๐Ÿฆž</td>
          <td>marine</td>
          <td>โŠ› lobster</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>shrimp</td>
          <td>U+1F990</td>
          <td>๐Ÿฆ</td>
          <td>marine</td>
          <td>shrimp</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>squid</td>
          <td>U+1F991</td>
          <td>๐Ÿฆ‘</td>
          <td>marine</td>
          <td>squid</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>soft-serve</td>
          <td>U+1F366</td>
          <td>๐Ÿฆ</td>
          <td>sweet</td>
          <td>soft ice cream</td>
          <td>mr whippy, soft serve</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>shaved ice</td>
          <td>U+1F367</td>
          <td>๐Ÿง</td>
          <td>sweet</td>
          <td>shaved ice</td>
          <td>snow cone</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>ice cream</td>
          <td>U+1F368</td>
          <td>๐Ÿจ</td>
          <td>sweet</td>
          <td>ice cream</td>
          <td>bowl of ice cream, dessert</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>doughnut</td>
          <td>U+1F369</td>
          <td>๐Ÿฉ</td>
          <td>sweet</td>
          <td>doughnut</td>
          <td>donut</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>cookie</td>
          <td>U+1F36A</td>
          <td>๐Ÿช</td>
          <td>sweet</td>
          <td>cookie</td>
          <td>biscuit, chocolate cookie</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>birthday cake</td>
          <td>U+1F382</td>
          <td>๐ŸŽ‚</td>
          <td>sweet</td>
          <td>birthday cake</td>
          <td>birthday, cake, cake with candles</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>shortcake</td>
          <td>U+1F370</td>
          <td>๐Ÿฐ</td>
          <td>sweet</td>
          <td>shortcake</td>
          <td>cake, piece of cake, strawberry shortcake</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>cupcake</td>
          <td>U+1F9C1</td>
          <td>๐Ÿง</td>
          <td>sweet</td>
          <td>โŠ› cupcake</td>
          <td> </td>
          <td>11.0</td>
          <td>11.0</td>
        </tr>
        <tr>
          <td>pie</td>
          <td>U+1F967</td>
          <td>๐Ÿฅง</td>
          <td>sweet</td>
          <td>pie</td>
          <td> </td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
        <tr>
          <td>chocolate bar</td>
          <td>U+1F36B</td>
          <td>๐Ÿซ</td>
          <td>sweet</td>
          <td>chocolate bar</td>
          <td>block of chocolate</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>candy</td>
          <td>U+1F36C</td>
          <td>๐Ÿฌ</td>
          <td>sweet</td>
          <td>candy</td>
          <td>lolly, sweet</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>lollipop</td>
          <td>U+1F36D</td>
          <td>๐Ÿญ</td>
          <td>sweet</td>
          <td>lollipop</td>
          <td>android lollipop, lollypop</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>custard flan</td>
          <td>U+1F36E</td>
          <td>๐Ÿฎ</td>
          <td>sweet</td>
          <td>custard</td>
          <td>creme caramel, dessert, flan, pudding</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>honey</td>
          <td>U+1F36F</td>
          <td>๐Ÿฏ</td>
          <td>sweet</td>
          <td>honey pot</td>
          <td>honey, pot</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>baby formula</td>
          <td>U+1F37C</td>
          <td>๐Ÿผ</td>
          <td>drink</td>
          <td>baby bottle</td>
          <td>bottle feeding</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>milk</td>
          <td>U+1F95B</td>
          <td>๐Ÿฅ›</td>
          <td>drink</td>
          <td>glass of milk</td>
          <td> </td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>coffee</td>
          <td>U+2615</td>
          <td>โ˜•</td>
          <td>drink</td>
          <td>hot beverage</td>
          <td>coffee, hot chocolate, tea</td>
          <td>1.0</td>
          <td>4.0</td>
        </tr>
        <tr>
          <td>green tea</td>
          <td>U+1F375</td>
          <td>๐Ÿต</td>
          <td>drink</td>
          <td>teacup without handle</td>
          <td>green tea, matcha, matcha green tea</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>sake</td>
          <td>U+1F376</td>
          <td>๐Ÿถ</td>
          <td>drink</td>
          <td>sake</td>
          <td>bottle, rice wine</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>champagne</td>
          <td>U+1F37E</td>
          <td>๐Ÿพ</td>
          <td>drink</td>
          <td>bottle with popping cork</td>
          <td>celebration, champagne, sparking wine</td>
          <td>1.0</td>
          <td>8.0</td>
        </tr>
        <tr>
          <td>red wine</td>
          <td>U+1F377</td>
          <td>๐Ÿท</td>
          <td>drink</td>
          <td>wine glass</td>
          <td>alcohol, red wine, wine</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>martini</td>
          <td>U+1F378</td>
          <td>๐Ÿธ</td>
          <td>drink</td>
          <td>cocktail glass</td>
          <td>martini</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>tropical drink</td>
          <td>U+1F379</td>
          <td>๐Ÿน</td>
          <td>drink</td>
          <td>tropical drink</td>
          <td>fruit punch, tiki cocktail, tiki drink</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>beer</td>
          <td>U+1F37A</td>
          <td>๐Ÿบ</td>
          <td>drink</td>
          <td>beer mug</td>
          <td>beer stein, lager</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>2 beers</td>
          <td>U+1F37B</td>
          <td>๐Ÿป</td>
          <td>drink</td>
          <td>clinking beer mugs</td>
          <td>beers, cheers</td>
          <td>1.0</td>
          <td>6.0</td>
        </tr>
        <tr>
          <td>2 glasses of champagne</td>
          <td>U+1F942</td>
          <td>๐Ÿฅ‚</td>
          <td>drink</td>
          <td>clinking glasses</td>
          <td>celebration, champagne glasses, cheers</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>whiskey</td>
          <td>U+1F943</td>
          <td>๐Ÿฅƒ</td>
          <td>drink</td>
          <td>tumbler glass</td>
          <td>bourbon, rum, whiskey, whisky</td>
          <td>3.0</td>
          <td>9.0</td>
        </tr>
        <tr>
          <td>soft drink</td>
          <td>U+1F964</td>
          <td>๐Ÿฅค</td>
          <td>drink</td>
          <td>cup with straw</td>
          <td>milkshake, soda, soft drink</td>
          <td>5.0</td>
          <td>10.0</td>
        </tr>
      </tbody>
    </table>
  </div>
</main>
              
            
!

CSS

              
                main {
  display: flex;
  flex-direction: column;
  padding: 1em;
  align-items: center;
}

.table-wrapper {
  overflow: auto;
  max-width: 100%;
  background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 0 100%,
    radial-gradient(
      farthest-side at 0% 50%,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    ),
    radial-gradient(
        farthest-side at 100% 50%,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0)
      )
      0 100%;
  background-repeat: no-repeat;
  background-color: white;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-position: 0 0, 100%, 0 0, 100%;
  background-attachment: local, local, scroll, scroll;
}

tr {
  border-bottom: 1px solid;
}

th {
  background-color: #555;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
}

th,
td {
  text-align: left;
  padding: 0.5em 1em;
}

.active {
  font-style: italic;
}

.asc::after {
  font-style: normal;
  content: "\25B4";
  margin-left: 0.5em;
}

.desc::after {
  font-style: normal;
  content: "\25BE";
  margin-left: 0.5em;
}

              
            
!

JS

              
                const tableData = document.getElementById('tableData')
const thead = tableData.previousElementSibling
const rows = [...tableData.rows]
const orders = [1, 1, 1, 1, 1, 1, 1, 1]

const sort = (header, col, type) => {
  let rowCount = rows.length
  rows.sort((a, b) => {
    if (type === 'text') {
      let i = a.children[col].firstChild.nodeValue,
        j = b.children[col].firstChild.nodeValue
      return i === j ? 0 : i > j ? orders[col] : -orders[col]
    } else if (type === 'number') {
      let i = parseInt(a.children[col].firstChild.nodeValue),
        j = parseInt(b.children[col].firstChild.nodeValue)
      return i === j ? 0 : i > j ? orders[col] : -orders[col]
    }
  })
  orders[col] *= -1
  activeHeader(header)
  sortIndicator(header, orders[col])
  while (tableData.lastChild) tableData.lastChild.remove()
  while (rowCount--) tableData.prepend(rows[rowCount])
}

const activeHeader = header => {
  const thArray = Array.prototype.slice.call(thead.querySelectorAll('th'));
  thArray.forEach(th => {
    th.className = ''
    th.removeAttribute('aria-label')
    if (th === header) {
      th.classList.add('active')
    }
  })
}

const sortIndicator = (header, ordering) => {
  if (ordering === 1) {
    header.classList.remove('asc')
    header.classList.add('desc')
    header.setAttribute('aria-label', 'sort by ' + header.innerHTML + ' in descending order')
  } else if (ordering === -1) {
    header.classList.remove('desc')
    header.classList.add('asc')
    header.setAttribute('aria-label', 'sort by ' + header.innerHTML + ' in ascending order')
  }
}

thead.addEventListener(
  'click',
  event => {
    let target = event.target
    let type = target.dataset.type
    if (target.nodeName.toLowerCase() === 'th') {
      sort(target, target.cellIndex, type)
    }
  },
  0
)

              
            
!
999px

Console