From the course: CSS Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
The viewport meta tag - CSS Tutorial
From the course: CSS Essential Training
The viewport meta tag
- [Instructor] When mobile browsers first came into use, websites often used fixed-width layouts that were designed for desktop and laptop computers. Since phone screens are much smaller, loading the desktop sized layout on a webpage would result in a lot of content being cut off. By default, mobile browsers would scale down the websites to fit the device screen, presenting a zoomed out version of the desktop layout. With touchscreens, users can pinch and zoom in and out of different parts of the website. Mobile browsers still use this default behavior today. When adding responsive styles and media queries, we need to disable the scaling so your mobile optimized styles display as intended. We can do that using an HTML tag, often referred to as the viewport meta tag because it provides the browser with information about the viewport. The HTML template for the course project already includes this tag in the head section, so…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Intro to responsive design1m 29s
-
(Locked)
Intro to media queries4m 32s
-
(Locked)
Breakpoints and media queries3m 32s
-
(Locked)
Fluid layouts2m 36s
-
(Locked)
The viewport meta tag1m 53s
-
(Locked)
Testing responsive layouts3m 1s
-
(Locked)
Project: Breakpoints3m 38s
-
(Locked)
Project: Media queries: Part 112m 26s
-
(Locked)
Project: Media queries: Part 28m 26s
-
(Locked)
Project: Media queries: Part 36m 17s
-
-