text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
We have our big table.
1,464.49
1.23
But each table is really just a sequence of individual table rows.
1,465.72
4.32
And each of those rows is really just a sequence
1,470.04
2.34
of individual cells of data within that table.
1,472.38
3.33
And so that structure that we're imagining, a table that consists
1,475.71
3
of individual rows, where each row consists of individual cells,
1,478.71
3.81
is exactly how we're going to represent this table in HTML.
1,482.52
3.96
We're going to start with just a table tag.
1,486.48
3.24
That's going to represent the entirety of this table.
1,489.72
3.33
But inside of the table, we might have different parts.
1,493.05
2.82
We might have the heading of the table.
1,495.87
2.22
We might have the body of the table.
1,498.09
1.69
So in order to represent that, I'll add thead.
1,499.78
3.14
That's going to stand for the heading of the table,
1,502.92
2.13
the stuff at the top of the table that might
1,505.05
1.83
indicate what each column of the table means, for example.
1,506.88
3.21
And let's see, what columns do I want?
1,510.09
2.18
Well, let's go ahead and add some table headings,
1,512.27
2.05
which I can represent using the th tag, h for heading.
1,514.32
4.47
And maybe I want in this web page to display information
1,518.79
2.91
about various different oceans, for example.
1,521.7
2.28
So maybe I have one column for the ocean and another column,
1,523.98
3.87
another table heading, for the average depth of that ocean,
1,527.85
4.35
and another table heading for the maximum depth of that ocean.
1,532.2
5.67
And that'll be the very first row of that table, the heading of the table.
1,537.87
3.24
But in addition to the heading of the table,
1,541.11
1.84
we also have the body of the table.
1,542.95
1.94
So underneath the thead, I'll go ahead and include
1,544.89
2.81
tbody, body for the main part of the table where all my data is going to be.
1,547.7
4.75
And that body is going to consist of individual rows of a table.
1,552.45
3.91
So I might have a tr, which here stands for table row.
1,556.36
5.81
And inside of this table row, we'll go ahead and add some individual data
1,562.17
4.08
points inside of the table.
1,566.25
1.89
So inside of my table row, I'm going to have one table data point, or td,
1,568.14
4.23
for table data, that says Pacific Ocean, for example, then another table
1,572.37
5.01
data that says 4,280 meters, and then another one
1,577.38
4.23
for the maximum depth of the Pacific Ocean, which is 10,911 meters.
1,581.61
4.71
And, in fact, these three table heads as well
1,586.32
3.39
at the top of the page, the ocean, the average depth, and the maximum depth,
1,589.71
3.22
those should actually probably be in a row of their own
1,592.93
2.3
as well, because the very first part of the table, that is also a row.
1,595.23
4.21
So I'll go ahead and add a tr, short for table row and inside of that tr
1,599.44
5.27
put these headings.
1,604.71
1.41
I'll go ahead and add one more row just so we can see what this looks like.
1,606.12
3.13
And then, we'll take a look at the page and then go back to this code.
1,609.25
2.91
I'll add the Atlantic Ocean, too, which has an average depth of 3,646 meters,
1,612.16
6.17
as well as a maximum depth of 8,486 meters as well.
1,618.33
6.34
So when I open up table.html now, here's what I'm going to see.
1,624.67
4.16
I'm going to see a table-like representation of the data.
1,628.83
3.46
It's not just one thing after another after another anymore.
1,632.29
2.69
It's structured in a table.
1,634.98
1.12
Now, granted, there aren't any borders.
1,636.1
1.63
And I could probably add some colors and spacing
1,637.73
2.17
to make this look a little bit nicer.
1,639.9
1.75
But I see three columns--
1,641.65
1.34
ocean, average depth, and maximum depth, where this very first row
1,642.99
4.65
is what we might call the table header, the very top
1,647.64
2.31
of the table that's defining what all of the columns mean.
1,649.95
3.12
Inside of that table header is a single table row
1,653.07
3.27
that has three table data cells--
1,656.34
2.34
ocean, average depth, and maximum depth.
1,658.68
2.97
Then beneath this table header, represented in bold,
1,661.65
3.06
is the table's body, or the tbody element, inside
1,664.71
3.24
of which we had two rows, one for representing the Pacific Ocean,
1,667.95
3.33
one for representing the Atlantic Ocean.
1,671.28
2.25
And then we had data cells in each one of those rows
1,673.53
2.73
for representing each of the individual cells that's located within this table.
1,676.26
5.3
So this is what that page ultimately looks like.
1,681.56
2.53
And let's take one more look at the HTML just
1,684.09
1.92
to get an understanding for how all of these tags interact with one another.
1,686.01
4.82
And no need to memorize all these tags right now, slowly
1,690.83
2.84
as you begin to design HTML pages, you'll
1,693.67
2.1
start to get more familiar with what HTML tags are available to you.
1,695.77
3.6
And certainly, all of these HTML tags are
1,699.37
2
things that are easy to reference if you need to look them up.
1,701.37
2.59
It's very helpful to be able to look up something
1,703.96
2.04
like, how do I create a table in HTML?
1,706
2.13
And then you'll be able to see what the various different tags you'll
1,708.13
2.88
need to add are in order to generate the table that you're looking for.
1,711.01
3.99
But, again, just to recap, here, we have a table element, inside of which
1,715
3.84
are two child elements, thead and tbody.
1,718.84
3.36
Inside of each of those are one or more table rows, representing using tr.
1,722.2
4.95
Inside of each of those are three table data cells, representing using td.
1,727.15
6.12
And so using these nested tags, elements inside
1,733.27
2.31
of elements inside of other elements, we've
1,735.58
2.04
been able to build something far more complex than just a bulleted list.
1,737.62
3.51
We've been able to build an entire table that has information as well.
1,741.13
5.24
But ultimately, our web pages should be web pages that don't just
1,746.37
2.87
display information, but that also let users
1,749.24
2.85
interact with that information in some way.
1,752.09
2.68
For example, you might imagine that on Google's home page, for example,
1,754.77
3.11
it's not just unchanging.
1,757.88
1.45
There's a field where I can type something in.
1,759.33
2.39
And anytime users can provide input to a web page,
1,761.72
3.48
we generally call that a form, or some place
1,765.2
2.55
where a user can fill out a form in order
1,767.75
2.01
to provide information to the web page.
1,769.76
2.91
And so now, let's take a look at how we can use HTML
1,772.67
3.03
in order to create a form that's going to display some information.
1,775.7
4.42
So I'll go ahead and create a new page called form.html,
1,780.12
4.19