Home JS Output w/ jquery
Post
Cancel

JS Output w/ jquery

Markdown Table

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

MakeModelYearColorPrice
FordMustang2022Red$35,000
ToyotaCamry2022Silver$25,00
TeslaModel S2022White$80,000
CadillacBroughan1969Black$10,000
FordF-3501997Green$15,000
FordExcursion2003Green$25,000
FordRanger2012Red$8,000
KubotoL3301 Tractor2015Orange$12,000
FordFusion Energi2015Green$15,000
AcuraXL2006Grey$10,000
FordF150 Lightning2023Grey$70,000

HTML Table

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
%%html

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

<!-- Body contains the contents of the Document -->
<body>
    <table class="table">
        <thead>
            <tr>
                <th>Make</th>
                <th>Model</th>
                <th>Year</th>
                <th>Color</th>
                <th>Price</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Ford</td>
                <td>Mustang</td>
                <td>2022</td>
                <td>Red</td>
                <td>$35,000</td>
            </tr>
            <tr>
                <td>Toyota</td>
                <td>Camry</td>
                <td>2022</td>
                <td>Silver</td>
                <td>$25,000</td>
            </tr>
            <tr>
                <td>Tesla</td>
                <td>Model S</td>
                <td>2022</td>
                <td>White</td>
                <td>$80,000</td>
            </tr>
            <tr>
                <td>Cadillac</td>
                <td>Broughan</td>
                <td>1969</td>
                <td>Black</td>
                <td>$10,000</td>
            </tr>
            <tr>
                <td>Ford</td>
                <td>F-350</td>
                <td>1997</td>
                <td>Green</td>
                <td>$15,000</td>
            </tr>
            <tr>
                <td>Ford</td>
                <td>Excursion</td>
                <td>2003</td>
                <td>Green</td>
                <td>$25,000</td>
            </tr>
            <tr>
                <td>Ford</td>
                <td>Ranger</td>
                <td>2012</td>
                <td>Red</td>
                <td>$8,000</td>
            </tr>
            <tr>
                <td>Kuboto</td>
                <td>L3301 Tractor</td>
                <td>2015</td>
                <td>Orange</td>
                <td>$12,000</td>
            </tr>
            <tr>
                <td>Ford</td>
                <td>Fusion Energi</td>
                <td>2015</td>
                <td>Guard</td>
                <td>$25,000</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

MakeModelYearColorPrice
FordMustang2022Red$35,000
ToyotaCamry2022Silver$25,000
TeslaModel S2022White$80,000
CadillacBroughan1969Black$10,000
FordF-3501997Green$15,000
FordExcursion2003Green$25,000
FordRanger2012Red$8,000
KubotoL3301 Tractor2015Orange$12,000
FordFusion Energi2015Guard$25,000
AcuraXL2006Grey$10,000
FordF150 Lightning2024Guard$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>.
MakeModelYearColorPrice
FordMustang2022Red$35,000
ToyotaCamry2022Silver$25,000
TeslaModel S2022White$80,000
CadillacBroughan1969Black$10,000
FordF-3501997Green$15,000
FordExcursion2003Green$25,000
FordRanger2012Red$8,000
KubotoL3301 Tractor2015Orange$12,000
FordFusion Energi2015Guard$25,000
AcuraXL2006Grey$10,000
FordF150 Lightning2024Guard$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.
This post is licensed under CC BY 4.0 by the author.