暫定日本語訳:Viewport Meta Tag

暫定日本語訳:何 viewport meta tag does, なぜ it 作る responsive design 機能 on mobile, 正しい configuration, attribute reference, と 一般的な mistakes.

初回公開:2026年7月2日 · 最終更新:2026年8月4日 · Advanced
言語

暫定日本語訳:viewport meta tag — <meta name="viewport" content="width=device-width, initial-scale=1"> — hints へ ブラウザー へ size layout viewport へ device's width in CSS pixels instead of legacy ~980px fallback some mobile ブラウザー 使用. なしで it, phones できる render ページ at その wider fallback と shrink it, producing tiny text, horizontal scroll, と responsive breakpoints その 可能性がある ない apply as intended. It's ない ランキング factor itself, ただし its presence is one of things Google documents as indicating mobile-friendliness, と its absence is classic mobile usability failure. 決して force ユーザー-scalable=no または restrictive maximum-scale — it fails W3C's accessibility conformance rule 向けに zoom と できる lock out low-vision ユーザー, though ブラウザー できる override it (iOS 10+ ignores it by デフォルト). テスト it とともに Lighthouse または PageSpeed Insights: 検索 Console's Mobile Usability レポート と Mobile-Friendly テスト were retired December 1, 2023.

暫定日本語案: TL;DR — viewport meta tag — 暫定日本語案: <meta name="viewport" content="width=device-width, initial-scale=1"> — hints 暫定日本語案: ブラウザー へ size layout viewport へ device’s width in CSS pixels 暫定日本語案: instead of legacy ~980px fallback some mobile ブラウザー 使用, which is 何 lets 暫定日本語案: responsive CSS media クエリ evaluate against device’s real width on mobile. 暫定日本語案: 不足している または misconfigured, it’s classic mobile usability failure (tiny text, 暫定日本語案: horizontal scroll). It is ない ランキング factor — Google documents its 暫定日本語案: presence as one thing its mobile-friendliness evaluation checks 向けに, と no 暫定日本語案: more than その. 決して force user-scalable=no / restrictive maximum-scale: it 暫定日本語案: fails W3C’s ACT accessibility rule 向けに zoom, though ブラウザー overrides exist 暫定日本語案: (iOS 10+ ignores it by デフォルト). Google と Bing recommend identical tag. 暫定日本語案: テスト とともに Lighthouse / PageSpeed Insights — 検索 Console’s Mobile Usability 暫定日本語案: レポート と Mobile-Friendly テスト were retired December 1, 2023.

Evidence for this claim The viewport meta tag lets authors control viewport width and scaling so responsive layouts render at device width. Scope: Browser viewport behavior. Confidence: high · Verified: MDN: Viewport meta tag Evidence for this claim Pages should not disable browser zoom because users must be able to enlarge content for accessibility. Scope: WCAG resize-text requirement and viewport guidance. Confidence: high · Verified: W3C WAI: Understanding Resize Text

問題 it solves: ~980px virtual viewport

暫定日本語案: へ understand tag あなた have へ understand 何 it’s overriding. いつ mobile 暫定日本語案: ブラウザー were 新しい, lack of viewport tag meant some of them する fall 暫定日本語案: back へ fixed layout width of roughly 980px と render at その size — 暫定日本語案: deliberate accommodation so desktop-sized, pre-responsive サイト wouldn’t 暫定日本語案: completely break on early smartphones. ブラウザー then scaled result down へ 暫定日本語案: physical screen. MDN’s own framing: “If the site isn’t designed to work well on small viewports and this tag is omitted, some mobile browsers render the site using a fixed initial containing block width, typically 980px.” — it’s 暫定日本語案: ブラウザー-specific fallback, ない universal spec constant.

暫定日本語案: consequence, in Google’s own words: “Without a viewport meta tag, mobile devices render pages at typical desktop screen widths and then scale the pages down, making them difficult to read.” あなた get unreadable text, forced 暫定日本語案: pinch-zooming, と horizontal scrolling — textbook symptoms of ページ flagged “not mobile-friendly.”

暫定日本語案: 設定 tag “lets you control the width and scaling of the viewport so that it’s sized correctly on all devices.”

Layout viewport vs. visual viewport (下で hood)

暫定日本語案: Two “viewports” are in play, と it’s worth 保持 them straight:

  • 暫定日本語案: layout viewport is area ページ lays out へ と その fixed-position 暫定日本語案: elements attach へ. width=device-width sets この へ device’s screen width in 暫定日本語案: CSS pixels.
  • 暫定日本語案: visual viewport is 何 ユーザー is currently looking at — which changes 暫定日本語案: いつ それら pinch-zoom. Zooming changes visual viewport なしで changing 暫定日本語案: layout viewport.

暫定日本語案: 理由 この matters 向けに SEO と CSS: あなた responsive media クエリ 暫定日本語案: (@media (max-width: 600px) と friends) are evaluated against layout 暫定日本語案: viewport. If layout viewport is stuck at legacy ~980px fallback because 暫定日本語案: there’s no viewport tag, phone 可能性がある match あなた desktop breakpoints instead of 暫定日本語案: あなた narrow ones. MDN puts it plainly: “Without it, your responsive design with breakpoints and media queries may not work as intended on mobile browsers.” 暫定日本語案: tag is 何 作る device-width layout viewport so あなた intended breakpoints 暫定日本語案: evaluate correctly.

Evidence for this claim Without an appropriate viewport hint, narrow responsive breakpoints may not match as intended against the wider virtual layout viewport; it is too absolute to say CSS media queries never fire. Scope: production HTML and HTTP responses Confidence: high · Verified: Responsive web design

正しい tag, と どこ it goes

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- ...the rest of your head... -->
</head>

暫定日本語案: Put it high in <head>, near charset, 前に コンテンツ-dependent tags. この is 暫定日本語案: value Google, Bing, と Lighthouse all recommend — verbatim, it’s fix 暫定日本語案: Lighthouse itself suggests. Don’t overthink value: width=device-width, 暫定日本語案: initial-scale=1 is answer 向けに essentially すべての responsive サイト.

Attribute reference

暫定日本語案: content attribute is comma-separated list of directives. MDN is 暫定日本語案: canonical attribute-by-attribute reference; here’s 何 各 one does:

Directive何 it doesNotes
widthControls (minimum) pixel width of viewportwhole number 1–10000, または special value device-width ( screen width in CSS pixels). 使用 device-width.
initial-scalezoom ratio 間に device width と viewport on loadnumber 0.010.0. 使用 1.
minimum-scaleminimum zoom level 許可必要がある be ≤ maximum-scale. iOS 10+ ignores it by デフォルト.
maximum-scalemaximum zoom-in 許可必要がある be ≥ minimum-scale. iOS 10+ ignores it by デフォルト. Don’t restrict it.
user-scalableWhether ユーザー できる zoom (yes/no, デフォルト yes)iOS 10+ ignores it by デフォルト. 設定 no is accessibility anti-pattern — leave it.
interactive-widgetどのように interactive UI (e.g. virtual keyboards) affect viewportValues: resizes-visual (デフォルト), resizes-content, overlays-content. Newer; 大半の SEO コンテンツ omits it.
viewport-fitどのように viewport handles display cutouts (notches)Values: auto (デフォルト), contain (fits inside largest rectangle その avoids cutout), cover (fills display — pair とともに CSS env() safe-area-inset variables so コンテンツ doesn’t land 下で cutout).

暫定日本語案: viewport-fitinteractive-widget are both ブラウザー-layout edge ケース — 暫定日本語案: display-cutout と virtual-keyboard handling, respectively — ない SEO directives; 暫定日本語案: 大半の SEO-focused guides skip them entirely.

暫定日本語案: small ただし real gotcha から Lighthouse’s own docs: 設定 initial-scale below 暫定日本語案: 1 できる trigger legacy double-tap-へ-zoom behavior その adds interaction delay — 暫定日本語案: another 理由 へ stick とともに initial-scale=1 rather than getting clever.

決して disable zoom: user-scalable=no is anti-pattern

暫定日本語案: あなた’ll still find user-scalable=no (または maximum-scale=1) copy-pasted へ 古い 暫定日本語案: theme boilerplate, usually から developer who didn’t want pinch-zoom “messing up” 暫定日本語案: their layout. It’s 誤った on two counts:

  1. 暫定日本語案: It fails web’s own accessibility conformance テスト 向けに zoom, と it 機能 暫定日本語案: against WCAG’s intent. W3C’s ACT rule “Meta viewport allows for zoom” 暫定日本語案: (rule b4f0c3) applies へ any viewport tag その sets user-scalable または 暫定日本語案: maximum-scale, と its expectation is explicit: tag 必要がある ない 設定 暫定日本語案: user-scalable=no, と maximum-scale 必要がある ない be 設定 below 2. ( rule 暫定日本語案: carries stated assumptions — it doesn’t apply if ページ has no visible 暫定日本語案: コンテンツ, オファー another way へ resize text, または 決して needs へ reflow past 暫定日本語案: 320×256 CSS-pixel area — ただし typical responsive ページ doesn’t meet それらの 暫定日本語案: exceptions.) Per MDN: “Disabling zooming capabilities by setting user-scalable to a value of no prevents people experiencing low vision conditions from being able to read and understand page content. Additionally, WCAG requires a minimum of 2× scaling; however, the best practice is to enable a 5× zoom.” Blocking zoom locks out exact ユーザー who need it 大半の.
  2. 暫定日本語案: It’s また ブラウザー-specific, ない universal. iOS Safari 10 と later ignore 暫定日本語案: user-scalable=no と restrictive maximum-scale by デフォルト — その’s iOS 暫定日本語案: override, ない change へ ACT rule または へ WCAG’s intent. So on large share 暫定日本語案: of mobile トラフィック 設定 accomplishes nothing, while on ブラウザー その do 暫定日本語案: still honor it (older Android WebViews, some in-app ブラウザー) it actively fails 暫定日本語案: accessibility テスト above. Zero upside, real downside — と don’t treat “iOS ignores it” as proof markup is accessible everywhere.
Evidence for this claim `user-scalable=no` and `maximum-scale` below 2 fail the cited ACT rule's expectation under its assumptions, and disabling zoom harms low-vision users; an automated ACT failure is not by itself a complete universal WCAG conformance determination. Scope: production HTML and HTTP responses Confidence: high · Verified: Viewport meta tag

暫定日本語案: rule is simple: don’t touch zoom. width=device-width, initial-scale=1 と 暫定日本語案: nothing else.

Is it ランキング factor

暫定日本語案: Be precise here, because lot of SEO コンテンツ overstates it. Here’s exactly 何 暫定日本語案: Google documents, と どこ line へ industry inference sits.

暫定日本語案: 何 Google documents: viewport tag is ない direct ランキング factor. 暫定日本語案: Google’s own supported-meta-tags doc says plainly その “presence of this tag indicates to Google that the page is mobile friendly” — その’s whole 暫定日本語案: documented claim: presence signals mobile-friendliness. Google doesn’t document 暫定日本語案: tag as scored, as rendering guarantee, または as proof ページ’s responsive design 暫定日本語案: is actually good.

Evidence for this claim Google documents that viewport-meta presence indicates a page is mobile friendly, but that statement does not establish that the tag itself is a ranking factor, a display guarantee or sufficient evidence of responsive quality. Scope: production HTML and HTTP responses Confidence: high · Verified: Meta tags and attributes that Google supports

暫定日本語案: どこ practitioners connect dots (industry inference, ない Google 暫定日本語案: citation): 不足している または misconfigured viewport tag is 一般的な root cause of 暫定日本語案: mobile-usability failures (tiny text, horizontal scroll, unusable tap targets) その 暫定日本語案: SEOs generally understand へ degrade mobile ページ experience. その connection is 暫定日本語案: reasonable と widely held in industry, ただし it’s practitioner inference について 暫定日本語案: なぜ tag matters — ない something Google’s docs state as ランキング chain.

暫定日本語案: So honest framing: tag itself isn’t scored, と fix it because ページ 暫定日本語案: なしで it renders badly on phones — ない because Google documents it as ランキング 暫定日本語案: lever, direct または indirect. 保つ この separate から mobile-最初 インデックス登録 too: 暫定日本語案: その’s distinct Google 検索 concept について which version of あなた ページ Google 暫定日本語案: primarily 使用 向けに インデックス登録 と ランキング; viewport tag is について どのように その mobile 暫定日本語案: HTML renders in ブラウザー, full stop.

Evidence for this claim Mobile-first indexing means Google primarily uses the mobile content for indexing and ranking; it is a separate Google Search concept from the browser's viewport rendering contract. Scope: production HTML and HTTP responses Confidence: high · Verified: Mobile-first indexing best practices

どのように へ テスト it — tooling changed in 2023

暫定日本語案: この is どこ 大半の older guides are stale. On December 1, 2023, Google 暫定日本語案: retired 検索 Console’s Mobile Usability レポート, Mobile-Friendly テスト ツール, 暫定日本語案: と Mobile-Friendly テスト API (announced April 2023, confirmed 完全な その 暫定日本語案: December). Google’s reasoning was その other ツール had matured — “many other robust resources for evaluating mobile usability have emerged, including Lighthouse from Chrome.” So if tutorial tells あなた へ open 検索 Console → Mobile Usability へ 暫定日本語案: 確認 あなた viewport, その レポート no longer exists.

暫定日本語案: Layer これらの checks rather than relying on one ツール: confirm tag exists in 暫定日本語案: raw served HTML (ない just 後に JavaScript runs), confirm あなた responsive 暫定日本語案: breakpoints actually apply at phone widths, テスト zooming へ 200% なしで 暫定日本語案: layout breaking ( resize behavior WCAG’s intent is built around), と 暫定日本語案: spot-確認 in more than one ブラウザー — iOS Safari-だけ 確認 できる hide 暫定日本語案: zoom-restriction bug その Android または in-app ブラウザー still enforce.

暫定日本語案: あなた 現在の toolkit:

  • 暫定日本語案: Lighthouse (in Chrome DevTools). relevant audit historically read “Does not have a <meta name="viewport"> tag with width or initial-scale — it 暫定日本語案: fails unless <head> has meta name="viewport" whose content 含む 暫定日本語案: width=. As of Lighthouse 13 it’s folded へ “Optimize viewport for mobile” 暫定日本語案: insight.
  • 暫定日本語案: PageSpeed Insights — runs Lighthouse plus field Core Web Vitals データ.
  • 暫定日本語案: Chrome DevTools device toolbar — emulate phone dimensions と eyeball it.
  • 暫定日本語案: Bing’s Mobile Friendliness テスト ツール — Bing checks viewport と zoom-control 暫定日本語案: configuration too, と recommends 同じ tag Google does.
  • 暫定日本語案: View ソース / real-device 確認 — sometimes fastest テスト is へ just look 暫定日本語案: at <head> on あなた phone.

よくある間違い

  • 暫定日本語案: No tag at all (“viewport not set”) — ページ renders at legacy 暫定日本語案: desktop-ish width と shrinks.
  • 暫定日本語案: ** hardcoded pixel width** like width=1024 instead of device-width — tag 暫定日本語案: exists, ただし it still doesn’t match ページ へ device. Lighthouse と real 暫定日本語案: mobile-friendliness both want usable width= value, ない just any tag.
  • 暫定日本語案: initial-scale below 1 — できる trigger legacy double-tap-zoom delay.
  • 暫定日本語案: user-scalable=no / restrictive maximum-scale — copy-pasted から 古い 暫定日本語案: boilerplate; accessibility anti-pattern, ignored on iOS anyway.

暫定日本語案: 向けに どこ この sits in broader mobile 機能 — configuration, コンテンツ parity, 暫定日本語案: speed — see mobile SEO hub, mobile SEO 確認, と mobile-最初 暫定日本語案: インデックス登録. 向けに tag itself as part of wider on-ページ tag family, meta tags 暫定日本語案: cluster is map.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.