8 min read

Markdown Table

Google markdown cheat sheet and it lead you to an outline for how to make a table.

Company Model Price
Apple iPhone 14 $799
Apple iPhone 14 Plus $899
Apple iPhone 14 Pro $999
Apple iPhone 14 Pro Max $1099
Samsung Galaxy S23 $799
Samsung Galaxy S23 Plus $999
Samsung Galaxy S23 Ultra $1199
Google Pixel 7 $599
Google Pixel 7 Pro $899
Motorola Razr+ $999
OnePlus Nord N30 $299

HTML Table

Google w3schools html table and it will lead you to a tutorial on how to make tables.

%%html

<h2>HTML Cell Output from Jupyter</h2>

<!-- Body contains the contents of the Document -->
<body>
    <table class="table">
        <thead>
            <tr>
                <th>Company</th>
                <th>Model</th>
                <th>Price</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Apple</td>
                <td>iPhone 14</td>
                <td>$799</td>
            </tr>
            <tr>
                <td>Apple</td>
                <td>iPhone 14 Plus</td>
                <td>$899</td>
            </tr>
            <tr>
                <td>Apple</td>
                <td>iPhone 14 Pro</td>
                <td>$999</td>
            </tr>
            <tr>
                <td>Apple</td>
                <td>iPhone 14 Pro Max</td>
                <td>$1099</td>
            </tr>
            <tr>
                <td>Samsung</td>
                <td>Galaxy S23</td>
                <td>$799</td>
            </tr>
            <tr>
                <td>Samsung</td>
                <td>Galaxy S23 Plus</td>
                <td>$999</td>
            </tr>
            <tr>
                <td>Samsung</td>
                <td>Galaxy S23 Ultra</td>
                <td>$1199</td>
            </tr>
            <tr>
                <td>Google</td>
                <td>Pixel 7</td>
                <td>$599</td>
            </tr>
            <tr>
                <td>Google</td>
                <td>Pixel 7 Pro</td>
                <td>$899</td>
            </tr>
            <tr>
                <td>Acura</td>
                <td>XL</td>
                <td>2006</td>
                <td>Grey</td>
                <td>$10,000</td>
            </tr>
            <tr>
                <td>Ford</td>
                <td>F150 Lightning</td>
                <td>2024</td>
                <td>Guard</td>
                <td>$70,000</td>
            </tr>
        </tbody>
    </table>
</body>

HTML Cell Output from Jupyter

Company Model Price
Apple iPhone 14 $799
Apple iPhone 14 Plus $899
Apple iPhone 14 Pro $999
Apple iPhone 14 Pro Max $1099
Samsung 🇺🇸 Galaxy S23 $799
Samsung Galaxy S23 Plus $999
Samsung Galaxy S23 Ultra $1199
Google Pixel 7 $599
Google Pixel 7 Pro $899
Acura XL 2006 Grey $10,000
Ford F150 Lightning 2024 Guard $70,000

HTML Table in Markdown Cell with JavaScript jquery

JavaScript is a programming language that works with HTML data, CSS helps to style that data. In this example, we are using JavaScript and CSS that was developed by others (3rd party). Addithing the 3rd party code makes the table interactive.

  • Look at the href and src on lines inside of the lines in <head> tags. This is adding code to our page from others.
  • Observe the <script> tags at the bottom of the page. This is generating the interactive table, from the third party code, using the data <table id="demo"> from the <body>.
Make Model Year Color Price
Ford Mustang 2022 Red $35,000
Toyota Camry 2022 Silver $25,000
Tesla Model S 2022 White $80,000
Cadillac Broughan 1969 Black $10,000
Ford F-350 1997 Green $15,000
Ford Excursion 2003 Green $25,000
Ford Ranger 2012 Red $8,000
Kuboto L3301 Tractor 2015 Orange $12,000
Ford Fusion Energi 2015 Guard $25,000
Acura XL 2006 Grey $10,000
Ford F150 Lightning 2024 Guard $70,000

Hacks

This lesson teaches you about tables. In this hack, it is important that you analze the difference in the styles of output shown.

  • Make your own tables, with data according to your interests.
  • Describe a benefit of a markdown table.
  • Try to Style the HTML table using w3schools.
  • Describe the difference between HTML and JavaScript.
  • Describe a benefit of a table that uses JavaScript.