Loading
Current section: Search Engine Optimization 6 exercises
solution

Meta Tags for Better SEO and UX

Transcript

00:00 Everything between the opening HTML tag and the closing HTML tag is our responsibility. So if it's not showing up, that's our role. That's what we're supposed to do. And we do that in the root. So if we want something in the head, we're going to do that in our root route. So we just are going to put a couple of meta tags in here.

00:18 We're going to have a title. This can be epic notes. We'll have a meta tag for the description. And yeah, a note taking app. Do whatever makes sense for what you're trying to do.

00:32 Like what shows up in search results or on a social media share or something like that. That's what you're going to put in the content. So a note taking app, sure. I think we do something different in the final solution, but yeah, whatever. The char set, UTF-8.

00:48 So most browsers or modern browsers will default to UTF-8. However, there is a possibility that the encoding will be misinterpreted somehow. So by specifying the meta tag right here, we avoid those problems.

01:06 So we've got the UTF-8 here. And then we also specify our viewport. This is for mobile devices. If you've ever opened up a website where everything looked like teeny, like it was a desktop screen that was scrunched down or smooshed down into a small viewport. That's what's going on.

01:24 They haven't set this viewport thing here. And so this will just make it fill the screen better. And of course, that's not going to solve all of your responsive issues. But yeah, this is a pretty common meta tag. In fact, all of these are pretty common. You'll see this on most sites.

01:42 Of course, we can also add social images and things like that. That'll all be kind of the same. But for those things, you typically are going to want to use the meta export, which we'll get to next. So let's get rid of all this. We'll save this. And we get a reload. Ta-da. So all that stuff is there. Now we have our title. Looks nice.

02:01 Any page that we go to, that is going to be our title. And so we're in certainly a much better place than we were before. And we're also a little bit better on mobile and safer on all devices. So we're in a good place with these meta tags.