WEBVTT

1
00:00:00.000 --> 00:00:07.593
[MUSIC]

2
00:00:09.593 --> 00:00:11.521
Hi, my name is Anwar.

3
00:00:11.521 --> 00:00:15.283
I'm a designer, a developer,
and a teacher at Treehouse.

4
00:00:15.283 --> 00:00:17.054
My pronouns are he/him.

5
00:00:17.054 --> 00:00:20.803
In this course, we're going 
to learn the basics of CSS,

6
00:00:20.803 --> 00:00:27.390
one of the core technologies for designing
and building websites and applications.

7
00:00:27.390 --> 00:00:31.418
No matter what kind of website or
web application you want to build,

8
00:00:31.418 --> 00:00:33.410
you'll have to use CSS.

9
00:00:34.470 --> 00:00:36.928
If you haven't written much CSS, or

10
00:00:36.928 --> 00:00:41.110
even if you've never written
CSS at all, don't worry.

11
00:00:41.110 --> 00:00:43.290
That's what this course is for.

12
00:00:43.290 --> 00:00:45.897
We'll start with basic CSS concepts,

13
00:00:45.897 --> 00:00:50.090
then gradually progress to more
advanced topics and lessons.

14
00:00:51.490 --> 00:00:55.247
But before diving into CSS, it's 
important to have a basic

15
00:00:55.247 --> 00:00:59.210
understanding of HTML and
the structure of a document.

16
00:00:59.210 --> 00:01:05.297
If you're not familiar with HTML,
go through our HTML courses first,

17
00:01:05.297 --> 00:01:08.960
then meet me right back
here in CSS basics.

18
00:01:08.960 --> 00:01:11.123
So, what exactly is CSS,

19
00:01:11.123 --> 00:01:14.430
and why is it considered
a core web technology?

20
00:01:15.520 --> 00:01:18.419
CSS stands for Cascading 
Style Sheets, and is a

21
00:01:18.419 --> 00:01:23.290
stylesheet language used to describe 
the presentation of web pages.

22
00:01:24.450 --> 00:01:29.095
As you might have learned in previous
courses, a web page is made up of three

23
00:01:29.095 --> 00:01:34.560
different layers that work together
to deliver an experience to the user.

24
00:01:34.560 --> 00:01:38.820
There's a content layer, a presentation
layer and the behavior layer.

25
00:01:40.050 --> 00:01:46.802
The content layer is HTML, the structural
foundation or outline of a web page.

26
00:01:46.802 --> 00:01:51.994
Content like headings,
paragraphs, bulleted lists,

27
00:01:51.994 --> 00:01:56.829
links, and images are 
marked up by our HTML.

28
00:01:56.829 --> 00:02:00.542
The behavior layer is normally
handled by JavaScript,

29
00:02:00.542 --> 00:02:03.550
which provides real-time 
user interaction.

30
00:02:04.940 --> 00:02:09.055
And CSS is what handles the 
presentation layer of a web page,

31
00:02:09.055 --> 00:02:12.820
controlling the appearance 
of our HTML.

32
00:02:12.820 --> 00:02:17.551
We use our style sheets to
style the HTML with colors,

33
00:02:17.551 --> 00:02:22.298
font sizes, backgrounds,
layout, and much more.

34
00:02:22.298 --> 00:02:27.583
CSS also allows us to adapt our
content to various devices,

35
00:02:27.583 --> 00:02:30.660
screen sizes, and resolutions.

36
00:02:31.980 --> 00:02:34.614
As we move forward,
you'll learn strategies for

37
00:02:34.614 --> 00:02:37.990
keeping these three layers
separate from each other.

38
00:02:37.990 --> 00:02:42.650
HTML for content, CSS for
style, JavaScript for behavior.

39
00:02:44.580 --> 00:02:46.766
Back in the days before 
CSS was introduced, 

39b
00:02:46.766 --> 00:02:51.266
developers would have to embed
presentational tags and attributes

40
00:02:51.266 --> 00:02:56.280
in the HTML to control the 
design of a web page.

41
00:02:56.280 --> 00:02:59.494
While it's technically still 
possible, you'll want to keep 

42
00:02:59.494 --> 00:03:03.620
your structure and
presentation separate.

43
00:03:03.620 --> 00:03:05.827
There are two important 
reasons for this.

44
00:03:08.817 --> 00:03:12.170
Writing semantic HTML means 
choosing the right element 

45
00:03:12.170 --> 00:03:16.065
for the job. When choosing an 
HTML element, it's important 

46
00:03:16.065 --> 00:03:20.640
to ask yourself what purpose 
does this content have,

47
00:03:20.640 --> 00:03:23.010
not what should this 
content look like.

48
00:03:24.350 --> 00:03:28.734
Proper semantic HTML will make
your content more meaningful,

49
00:03:28.734 --> 00:03:32.960
more accessible, and easier 
to find using a search engine.

50
00:03:34.590 --> 00:03:39.040
HTML was never intended to be
a presentational language.

51
00:03:39.040 --> 00:03:42.770
So defining presentation in 
the HTML creates an

52
00:03:42.770 --> 00:03:48.353
inefficient workflow. Imagine 
having to manually edit tens or

53
00:03:48.353 --> 00:03:53.313
hundreds of HTML files to make 
a styling change. CSS makes

54
00:03:53.313 --> 00:03:58.073
the development and maintenance
of websites more efficient because

55
00:03:58.073 --> 00:04:02.760
the styles written in a single style
sheet can be shared across 

56
00:04:02.760 --> 00:04:08.045
multiple web pages. A change to 
one CSS file, such as adjusting the 

57
00:04:08.045 --> 00:04:13.270
background color, can be reflected
on all pages of your website or app.

58
00:04:14.600 --> 00:04:18.982
And what's exciting is that
CSS continues to evolve.

59
00:04:18.982 --> 00:04:24.950
Sophisticated visual effects like
rounded corners, text and box shadows,

60
00:04:24.950 --> 00:04:30.566
gradients, and even animations have
been built into CSS for some time.

61
00:04:30.566 --> 00:04:35.733
CSS also includes multi column layouts,
grids and Flexbox designed

62
00:04:35.733 --> 00:04:41.980
to keep your layouts flexible and legible
across a variety of screens and devices.

63
00:04:43.090 --> 00:04:45.107
As new technologies arrive,

64
00:04:45.107 --> 00:04:50.920
CSS will continue to add features to
help you meet the latest challenges.

65
00:04:50.920 --> 00:04:53.120
It's a great time to be learning CSS.
