The Viewport – Window of the browser

As already mentioned in HTML – The structure of website the viewport is reponsible for how a website is presented to the current device.

What is the viewport?

The viewport is the area, which is visible for the user opening your website on a specific device.

This viewport can be different per device due to the fact, that devices can have different display sizes and/or resolutions.

Here you can see the website devguide.at with an viewport meta tag as a mobile device:

And here without an viewport meta tag

How do you add/adjust the viewport?

The following meta tag needs to be placed inside the <head> area of your HTML:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen