text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
which is a language that we can use to
describe the structure of the web page, | 224.84 | 3.48 |
all of the buttons and the text and the
forms and other parts of the web page | 228.32 | 3.9 |
that the user ultimately
sees and interacts with. | 232.22 | 3.51 |
Our very first HTML page is going to
look a little something like this. | 235.73 | 3.51 |
It's going to be text-based code that
we write that a web browser, like Safari | 239.24 | 3.87 |
or Chrome or Firefox, is then able
to look at, parse, understand, | 243.11 | 4.11 |
and display to the user. | 247.22 | 2.11 |
So let's take a look at
this page one line at a time | 249.33 | 2.24 |
and get an understanding
for how it works. | 251.57 | 2.1 |
Even if you don't quite understand
all the nuances of the syntax, | 253.67 | 2.94 |
there are probably a couple of
things that stand out to you. | 256.61 | 2.58 |
You might notice the word
title, which probably | 259.19 | 2.16 |
reflects the title of the web page,
for example, which in this case | 261.35 | 3.3 |
appears to be the word hello. | 264.65 | 1.89 |
And then down further below, we see
that we have the body of the web page | 266.54 | 3.57 |
that seems to contain
the words hello world. | 270.11 | 2.95 |
So what is this web page
actually going to look like? | 273.06 | 2.39 |
Well, let's take a look at it. | 275.45 | 2.11 |
We'll go ahead and
open up a text editor. | 277.56 | 1.85 |
You can use any text editor you want. | 279.41 | 1.73 |
But for this course, I'm going to
use Microsoft's Visual Studio Code. | 281.14 | 3.46 |
And I'm going to open up a new file
that I'm just going to call hello.html. | 284.6 | 6.09 |
Inside of hello.html I'm going to
write the same HTML that we just | 290.69 | 4.02 |
saw a moment ago. | 294.71 | 0.9 |
And we'll explain each of
these lines in due time. | 295.61 | 2.73 |
But recall that we had a title of the
page that said something like hello | 298.34 | 5.7 |
and then a body of the page where
we said something like hello world, | 304.04 | 4.02 |
for example. | 308.06 | 1.51 |
So this is our very first HTML page. | 309.57 | 2.59 |
And if I go ahead and open that HTML
page as my opening hello.html HTML, | 312.16 | 4.21 |
for example, inside of a web browser,
what I'll see is something like this. | 316.37 | 4.62 |
In the body of the page, I
see the words hello world. | 320.99 | 3.34 |
And if you notice up here at
the top of my web browser, | 324.33 | 2.69 |
I see the title bar, where I have the
title for this page, which in this case | 327.02 | 4.17 |
is just the word hello. | 331.19 | 1.92 |
So this is our very first
web program that we've | 333.11 | 2.91 |
been able to develop just using HTML. | 336.02 | 2.25 |
And now let's explore in more detail
how exactly this program works. | 338.27 | 4.59 |
So here again was the web page
that we were just looking at. | 342.86 | 3.15 |
And this very first
line here, DOCTYPE html | 346.01 | 3.42 |
is what we might call
a DOCTYPE declaration. | 349.43 | 2.91 |
It's a way of telling the web
browser what version of HTML | 352.34 | 3.57 |
we're using in this particular
web page, because depending | 355.91 | 3.09 |
on the version of HTML,
the web browser might | 359 | 2.2 |
want to display different
information or it might need to parse | 361.2 | 2.63 |
the page a little bit differently. | 363.83 | 1.83 |
Each version of HTML has
had a slightly different way | 365.66 | 2.76 |
of indicating that version. | 368.42 | 1.47 |
But this line here,
DOCTYPE html is our way | 369.89 | 3.15 |
of saying that this HTML
page is written using | 373.04 | 2.85 |
HTML5, the latest version of HTML. | 375.89 | 3.87 |
After that our HTML page is structured
as a series of nested HTML elements, | 379.76 | 6.15 |
where an HTML element describes
something on the page. | 385.91 | 3.46 |
And we might have elements that
are inside of other elements. | 389.37 | 3.71 |
Each of those elements
is indicated by what | 393.08 | 2.22 |
we're going to call an HTML tag,
enclosed using those angled brackets. | 395.3 | 4.23 |
And right here, we'll see the
beginning of the HTML tag, which | 399.53 | 3.81 |
means that this is the beginning
of the HTML content of our page. | 403.34 | 4.32 |
Down below this slash
HTML means that this | 407.66 | 3.51 |
is the end of the HTML
content of the page. | 411.17 | 2.88 |
And in between is the actual
HTML content of the page, | 414.05 | 3.52 |
which might include other HTML elements. | 417.57 | 3.36 |
You might also notice
that in this HTML tag | 420.93 | 2.67 |
we've specified what we're
going to call an HTML attribute, | 423.6 | 3.39 |
some additional information that
we're giving about this tag. | 426.99 | 3.45 |
In particular, we're giving it
a lang, or language, attribute, | 430.44 | 3.81 |
which is equal to en, or English. | 434.25 | 3.3 |
This just tells the web browser or
anyone looking at the HTML of this page | 437.55 | 3.87 |
that this page is written in a language,
and the language it's written in | 441.42 | 3.1 |
is English. | 444.52 | 1.07 |
And this is helpful for
search engines, for example. | 445.59 | 2.22 |
When they're looking through
many different web pages trying | 447.81 | 2.19 |
to figure out what language
each web page is in we | 450 | 2.22 |
can just tell the search engine or
anyone else who's looking at the page | 452.22 | 3.15 |
that this page is written in English. | 455.37 | 3.19 |
Now, inside of the
HTML body of the page, | 458.56 | 2.56 |
we have a number of
different elements that | 461.12 | 1.91 |
are going to describe
what we want on this page, | 463.03 | 2.82 |
starting with the head section of
the web page, which describes stuff | 465.85 | 3.99 |
not in the main body of the web
page, the part of the web page | 469.84 | 2.61 |
the user sees, but other
information about the web | 472.45 | 2.88 |
page that's going to be helpful or
useful for web browsers to know about. | 475.33 | 3.79 |
For example, one important thing
that a web browser needs to know | 479.12 | 2.9 |
is, what is the title of the web page? | 482.02 | 3.03 |
And here, we see a title tag,
again, indicated by the word title | 485.05 | 3.81 |
in those angled brackets, followed
by the end of the title tag, | 488.86 | 3.6 |
indicated by a slash before the title. | 492.46 | 2.67 |
And in between the two title
tags is the word hello, | 495.13 | 3.15 |
which means the title of this
page should be the word hello. | 498.28 | 3.74 |
And that's all the information
we'll have in the head of the page. | 502.02 | 2.91 |
We'll add more information
there later, but for now | 504.93 | 2.12 |
all the web page needs to
know is that it has a title | 507.05 | 2.86 |
and the title is the word hello. | 509.91 | 2.53 |
Next up comes the body of the page,
again, indicated by a body tag | 512.44 | 3.99 |
and that ends with a
tag with slash body, | 516.43 | 2.61 |
meaning this is the end
of the body of the page. | 519.04 | 2.43 |
And the body of the page, again, is
just the visible part of the page | 521.47 | 2.91 |
that the user can see. | 524.38 | 1.56 |
And what do we want inside
the body of the page? | 525.94 | 2.43 |
For now, we just want
the text, hello world. | 528.37 | 2.47 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.