>> DAVID MALAN: So I've been working on this search engine
that looks like this.
I seem to have a title called CS50 Search, below which is an HTML form,
inside of which is an input whose type is text and another input
whose type is submit.
Let's now take a look at the underlying source code for this page.
>> Here in search-2.html, notice that I indeed have a title in the form of the
head as well as in the body with an h1 tag around it.
I have an HTML form, and then those two inputs.
But notice in particular on the body tag, that I've declared a style
attribute whose value is text-align: center;, thereby specifying that all
text on this page should be aligned in the center.
>> Now this works perfectly correctly, but it's a little bit sloppy.
You can't really tell as much because this page is fairly
small at the moment.
But imagine if this page got longer and longer and
longer and more complex.
>> Notice that the pattern I've adopted here is to intermingle my aesthetics
with the structure of the page by using the style attribute.
Long story short, this isn't the best design, certainly as your pages grow
more complex.
Better design would be to factor out that stylization and put it someplace
central, for instance not in a style attribute but in a style tag,
specifically a style tag inside of my page's head tag.
Let's do exactly that.
>> First let's go in here and delete this style attribute altogether.
Then back up in my page's head, let's declare a style tag and close it at
the same time, so I don't forget to later.
And then let's specify that the body of this page should have a CSS
property of text-align is center.
Let's now save this page, reload the browser, and see what the effect is.
>> Reloading in my browser--
no effect at all.
But no effect was intended.
We're simply improving this page's design.