Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,310 --> 00:00:03,383
Let's now add the meta description
2
00:00:03,383 --> 00:00:06,330
that we were missing and we're also going to add
3
00:00:06,330 --> 00:00:08,230
something called a favicon.
4
00:00:10,130 --> 00:00:12,740
And starting with the meta description,
5
00:00:12,740 --> 00:00:16,830
it's basically a short summary of our website's content.
6
00:00:16,830 --> 00:00:19,530
And it's also the text that will appear
7
00:00:19,530 --> 00:00:22,350
for each of the search results in Google
8
00:00:22,350 --> 00:00:24,163
and other search engines.
9
00:00:25,060 --> 00:00:29,070
So to add that to our page,
10
00:00:29,070 --> 00:00:32,113
we once again use the meta element.
11
00:00:33,270 --> 00:00:36,600
So meta again, stands for metadata,
12
00:00:36,600 --> 00:00:40,460
which is essentially data that describes other data.
13
00:00:40,460 --> 00:00:45,033
And so this is the official way of adding metadata to HTML.
14
00:00:47,180 --> 00:00:50,310
So here we need to specify a name
15
00:00:51,460 --> 00:00:56,460
and then description, and then the content.
16
00:00:59,140 --> 00:01:00,970
And so the content attribute here
17
00:01:00,970 --> 00:01:04,353
is where that summary of our content basically goes.
18
00:01:05,670 --> 00:01:10,627
So let's say that Omnifood is an AI-powered
19
00:01:15,940 --> 00:01:20,940
food subscription that will make you eat healthy again,
20
00:01:24,430 --> 00:01:28,963
365 days per year.
21
00:01:30,920 --> 00:01:32,818
So we could have copied this text also
22
00:01:32,818 --> 00:01:36,840
from multiple places on our page,
23
00:01:36,840 --> 00:01:39,000
but I'm just writing it out here.
24
00:01:39,000 --> 00:01:40,750
That's probably a bit quicker.
25
00:01:40,750 --> 00:01:45,540
So it's tailored to your personal tastes
26
00:01:45,540 --> 00:01:50,133
and nutritional needs.
27
00:01:52,370 --> 00:01:53,490
All right.
28
00:01:53,490 --> 00:01:57,690
So this is the text that will appear in search engines.
29
00:01:57,690 --> 00:01:59,480
So that's quite important.
30
00:01:59,480 --> 00:02:02,360
And now that's actually also finally give our page
31
00:02:02,360 --> 00:02:04,390
a proper title.
32
00:02:04,390 --> 00:02:08,060
So just Omnifood, here's a little bit poor here.
33
00:02:08,060 --> 00:02:12,310
So like this, it doesn't look really nice, right?
34
00:02:12,310 --> 00:02:16,650
So usually a page has something like a divider like this,
35
00:02:16,650 --> 00:02:21,650
like a dash or a colon or this vertical dash.
36
00:02:22,030 --> 00:02:24,230
And so let's do the same here.
37
00:02:24,230 --> 00:02:28,677
So I'll add a dash using an HTML entity called mdash.
38
00:02:31,580 --> 00:02:34,340
And maybe we already did that before.
39
00:02:34,340 --> 00:02:36,738
And so this one looks like this,
40
00:02:36,738 --> 00:02:41,113
so it's simply just a bigger dash than just writing this.
41
00:02:44,740 --> 00:02:49,433
So let's say as a nice headline here, never cook again.
42
00:02:50,667 --> 00:02:53,413
And so indeed that looks a little bit nicer here.
43
00:02:54,290 --> 00:02:56,360
Now, another thing that we are missing
44
00:02:56,360 --> 00:02:59,970
is something that all other pages also have usually,
45
00:02:59,970 --> 00:03:02,320
which is this icon here.
46
00:03:02,320 --> 00:03:04,760
So you'll see that each of these pages here
47
00:03:04,760 --> 00:03:09,180
has its own icon and this icon is called the favicon.
48
00:03:09,180 --> 00:03:13,120
And so let's now create our own here for our page.
49
00:03:13,120 --> 00:03:16,230
So replacing basically that default icon here,
50
00:03:16,230 --> 00:03:18,560
which looks really bad.
51
00:03:18,560 --> 00:03:19,970
So never just do that.
52
00:03:19,970 --> 00:03:24,163
Never leave this default icon without adding your own one.
53
00:03:25,570 --> 00:03:30,400
All right, now here in our content.
54
00:03:30,400 --> 00:03:31,670
So in our images,
55
00:03:31,670 --> 00:03:35,030
we already have this favicon right here.
56
00:03:35,030 --> 00:03:37,080
However, this one is huge.
57
00:03:37,080 --> 00:03:42,080
So 512 pixels, and it is a 15 kilobytes.
58
00:03:42,250 --> 00:03:45,080
Now it is this big because we actually need
59
00:03:45,080 --> 00:03:47,923
multiple versions basically of this icon.
60
00:03:48,870 --> 00:03:53,650
So we need this, icon here to be big for Android devices,
61
00:03:53,650 --> 00:03:55,920
and then we need some smaller versions
62
00:03:55,920 --> 00:03:58,917
for displaying it in a browser as a favicon,
63
00:03:58,917 --> 00:04:02,370
and also for something else on iOS.
64
00:04:02,370 --> 00:04:06,913
But first let's start with the favicon for browsers.
65
00:04:08,440 --> 00:04:10,230
So I'm going to open the folder
66
00:04:10,230 --> 00:04:11,880
that we are currently working in.
67
00:04:12,820 --> 00:04:15,660
So that's this one here,
68
00:04:15,660 --> 00:04:20,450
and then I'm going to open this image here like this.
69
00:04:20,450 --> 00:04:24,290
So on a Mac, it is very easy to resize the images,
70
00:04:24,290 --> 00:04:27,970
while on Windows I'm not sure how it works.
71
00:04:27,970 --> 00:04:30,590
So if you're on Windows, you probably need to download
72
00:04:30,590 --> 00:04:34,450
some application that you can use to resize images.
73
00:04:34,450 --> 00:04:37,380
Okay. And if you don't want to do that,
74
00:04:37,380 --> 00:04:39,500
you can simply take the final images
75
00:04:39,500 --> 00:04:42,393
out of the final course files.
76
00:04:45,990 --> 00:04:47,170
All right.
77
00:04:47,170 --> 00:04:49,070
I will just do that here very quickly.
78
00:04:50,150 --> 00:04:53,163
And actually we should copy it first.
79
00:04:55,080 --> 00:04:57,993
So you'll see, it's already called favicon.png,
80
00:04:59,200 --> 00:05:01,943
but let me copy that here so I can keep the original.
81
00:05:04,080 --> 00:05:08,340
So again, mark-up and once again, if you are on Windows,
82
00:05:08,340 --> 00:05:10,520
you can just download some other software
83
00:05:10,520 --> 00:05:13,370
or you can simply take the final files.
84
00:05:13,370 --> 00:05:18,050
So I'll resize this one to maybe 64 pixels.
85
00:05:18,050 --> 00:05:20,870
And so then you see it's only three kilobytes,
86
00:05:20,870 --> 00:05:22,433
so that's a lot better.
87
00:05:23,890 --> 00:05:24,830
All right.
88
00:05:24,830 --> 00:05:27,440
And let's close this and come back here
89
00:05:27,440 --> 00:05:29,793
and we will then use this one here in a minute.
90
00:05:31,450 --> 00:05:33,470
So somewhere here in the header again,
91
00:05:33,470 --> 00:05:35,790
let's now add that favicon.
92
00:05:36,940 --> 00:05:39,080
So we could probably do that anywhere,
93
00:05:39,080 --> 00:05:42,693
but I like to do it here after the meta text.
94
00:05:43,760 --> 00:05:46,750
So basically close to the styles
95
00:05:46,750 --> 00:05:49,090
because to include the favicon icon,
96
00:05:49,090 --> 00:05:52,353
we actually also use the link element.
97
00:05:54,190 --> 00:05:59,190
So link again, but now the rel attribute here
98
00:05:59,330 --> 00:06:03,980
is icon and then also the href property.
99
00:06:03,980 --> 00:06:06,420
And so here basically defining the path
100
00:06:06,420 --> 00:06:09,250
to that favicon file.
101
00:06:09,250 --> 00:06:13,423
So that's at image.favicon.png.
102
00:06:14,300 --> 00:06:18,523
Then let's close this and of course, outside here.
103
00:06:20,670 --> 00:06:23,180
Okay, and that should be it.
104
00:06:23,180 --> 00:06:26,160
And indeed, there is our favicon.
105
00:06:26,160 --> 00:06:29,045
And so this looks a lot better than before now.
106
00:06:29,045 --> 00:06:33,080
It gives our page a really nice and important touch here.
107
00:06:33,080 --> 00:06:34,920
So if you see now the other tabs
108
00:06:34,920 --> 00:06:37,830
here open besides this, then this one looks
109
00:06:37,830 --> 00:06:41,313
just like any other regular website, right?
110
00:06:42,160 --> 00:06:43,950
So really, really cool,
111
00:06:43,950 --> 00:06:46,670
but actually we are not done here yet.
112
00:06:46,670 --> 00:06:49,710
So we are done with the browser part,
113
00:06:49,710 --> 00:06:53,220
but there are actually ways of adding a website,
114
00:06:53,220 --> 00:06:56,740
basically as a favorite to iOS devices
115
00:06:56,740 --> 00:06:58,623
and also to Android devices.
116
00:06:59,490 --> 00:07:01,800
So I'm not sure if you have ever done that
117
00:07:01,800 --> 00:07:03,700
and how many users do this,
118
00:07:03,700 --> 00:07:05,017
but there is actually an option
119
00:07:05,017 --> 00:07:07,530
on both these operating systems
120
00:07:07,530 --> 00:07:11,700
that we can basically add a website to the home screen.
121
00:07:11,700 --> 00:07:15,403
And so for that, we will need to provide a special icon.
122
00:07:16,310 --> 00:07:19,643
So let's do that and starting with iOS.
123
00:07:22,910 --> 00:07:27,750
So here rel is apple-touch-icon,
124
00:07:30,840 --> 00:07:32,663
and then as always the href.
125
00:07:34,330 --> 00:07:37,003
And so let's now create that icon.
126
00:07:40,190 --> 00:07:41,830
So we have this one.
127
00:07:41,830 --> 00:07:45,383
Let's copy it again because we will need it again, actually.
128
00:07:48,130 --> 00:07:52,640
So lets call this apple-touch-icon,
129
00:07:52,640 --> 00:07:55,810
and then let's also do the ones for Android.
130
00:07:55,810 --> 00:08:00,810
So on Android we need actually two, so let me copy it again.
131
00:08:01,040 --> 00:08:02,510
So Copy + Paste.
132
00:08:02,510 --> 00:08:04,810
And also we need to change the dimension here.
133
00:08:06,150 --> 00:08:10,670
So markup, and this should be 180.
134
00:08:10,670 --> 00:08:14,350
So that's kind of a hard rule here for the Apple one.
135
00:08:14,350 --> 00:08:19,120
And then for the Android, we need one with 192
136
00:08:19,120 --> 00:08:21,213
and one with 512.
137
00:08:22,240 --> 00:08:27,240
So let's call this one favicon-192 and favicon-512.
138
00:08:31,220 --> 00:08:34,920
So this one is already 512, right?
139
00:08:34,920 --> 00:08:39,187
And so we just need to resize this one to be 192.
140
00:08:44,720 --> 00:08:47,080
All right. And you might think that all, this
141
00:08:47,080 --> 00:08:50,340
is a lot of work and not really necessary,
142
00:08:50,340 --> 00:08:54,998
but if you want to make your website perfect for all users,
143
00:08:54,998 --> 00:08:56,710
then you need to do this.
144
00:08:56,710 --> 00:08:59,240
And like real design studios,
145
00:08:59,240 --> 00:09:01,463
they of course go through all these steps.
146
00:09:02,670 --> 00:09:04,581
So it's nice that you know already
147
00:09:04,581 --> 00:09:06,383
how things like this work.
148
00:09:07,490 --> 00:09:09,590
So apple-touch-icon.
149
00:09:09,590 --> 00:09:12,768
And again, we will not really be able to test this now,
150
00:09:12,768 --> 00:09:15,780
because, well, we don't have an iPhone
151
00:09:15,780 --> 00:09:18,850
handy here on the screen, right?
152
00:09:18,850 --> 00:09:20,670
Now for the Android devices,
153
00:09:20,670 --> 00:09:22,820
it actually works a little bit differently.
154
00:09:23,870 --> 00:09:26,300
So for Android, we will need to create
155
00:09:26,300 --> 00:09:30,403
a brand new file right here, basically in the home folder.
156
00:09:31,710 --> 00:09:36,403
And that file is going to be called manifest.webmanifest,
157
00:09:40,170 --> 00:09:42,750
and so this is kind of a file extension
158
00:09:42,750 --> 00:09:44,330
that is used for Android
159
00:09:44,330 --> 00:09:47,543
to recognize the different favicons, basically.
160
00:09:48,700 --> 00:09:51,390
So here, let's just write this.
161
00:09:51,390 --> 00:09:53,343
So simply copy what I'm doing here.
162
00:09:55,270 --> 00:10:00,270
So icons, then colon and then the square brackets
163
00:10:02,030 --> 00:10:03,790
and then creating another object,
164
00:10:03,790 --> 00:10:05,533
which is what this is called.
165
00:10:06,430 --> 00:10:07,623
So then source.
166
00:10:08,840 --> 00:10:12,260
And of course you will not know all of this by heart.
167
00:10:12,260 --> 00:10:15,200
So this is something that you copy from somewhere.
168
00:10:15,200 --> 00:10:18,900
And even right now, I am copying this from somewhere else.
169
00:10:18,900 --> 00:10:20,560
So I don't know this by heart,
170
00:10:20,560 --> 00:10:23,223
obviously that would be a little bit too much.
171
00:10:24,434 --> 00:10:26,710
So anyway, for the source,
172
00:10:26,710 --> 00:10:29,570
we have to move into our image folder.
173
00:10:29,570 --> 00:10:31,723
Here we don't need to this slash, actually.
174
00:10:32,700 --> 00:10:37,700
And then I think it was called favicon-192.png.
175
00:10:40,320 --> 00:10:43,883
And yeah, so VS Code recognizes it immediately.
176
00:10:47,130 --> 00:10:49,520
Then we also need to specify the type,
177
00:10:49,520 --> 00:10:54,307
which is image/png and also the sizes.
178
00:10:58,470 --> 00:11:02,523
So 192 by 192.
179
00:11:03,820 --> 00:11:05,807
Okay. So that's the first one.
180
00:11:05,807 --> 00:11:08,180
And now let's simply copy this line,
181
00:11:08,180 --> 00:11:13,180
add a comma here and now the other one is the 512.
182
00:11:15,400 --> 00:11:19,293
And so 512 times 512.
183
00:11:21,270 --> 00:11:24,140
All right. So that's it for this one.
184
00:11:24,140 --> 00:11:27,010
And now here, we just need to reference that.
185
00:11:27,010 --> 00:11:32,010
So adding another link element, rel is now manifest
186
00:11:35,730 --> 00:11:40,730
and the href is well, manifest.webmanifest.
187
00:11:43,664 --> 00:11:45,693
And there we go, that's it.
188
00:11:46,610 --> 00:11:48,560
Well, except for closing this one here.
189
00:11:49,800 --> 00:11:51,770
Yeah. But now that is correct.
190
00:11:51,770 --> 00:11:54,597
And so with this, we added the right favicons
191
00:11:54,597 --> 00:11:56,793
basically for all platforms.
192
00:11:57,640 --> 00:12:00,040
So this one here works for the browser.
193
00:12:00,040 --> 00:12:02,800
This one here works for adding the website
194
00:12:02,800 --> 00:12:05,660
as an icon to the iOS home screen.
195
00:12:05,660 --> 00:12:09,550
And then the manifest here works for doing the same,
196
00:12:09,550 --> 00:12:10,850
but on Android, all right?
197
00:12:12,160 --> 00:12:14,890
And so we're almost, almost done here
198
00:12:14,890 --> 00:12:17,540
building and optimizing our page.
199
00:12:17,540 --> 00:12:19,190
Now, all we have to do next
200
00:12:19,190 --> 00:12:22,223
is to optimize our images in the next lecture.
14833
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.