Skip to content

This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung →

Checking viewport and character encoding: two lines that carry everything

Two values in the page head decide the basics: the viewport declaration tells the phone not to shrink the page like a desktop page, and the character encoding makes sure special characters arrive as themselves.

  • With no viewport declaration, a phone displays the page at desktop width and scales it down — text becomes unreadably small, and even the most carefully built responsive design doesn't take effect.
  • A missing or wrong character encoding leads to the familiar substitute characters in the middle of the text. This has become rare, but it still shows up on pages carried over from legacy systems.

FAQ

Which viewport declaration is correct?

Set the width to the device width and the initial scale to 1. Zooming must NOT be locked in the process — a lock is also an accessibility problem.

Is UTF-8 always the right choice?

For new pages, practically always. What matters is that the declaration matches how the files are actually saved — otherwise the substitute characters show up anyway.

Deutsche Fassung — mit allen Prüfpunkten dieses Themas