ページに HTML Doctype が指定されていないため、Quirks モードがトリガーされる

公開日 更新日

翻訳先言語: English, Español, Português, 한국어, 中文, Pусский

Doctype を指定すると、ブラウザが Quirks モードに切り替えて、ページを予期しない方法でレンダリングしてしまうことを防止できます。

Lighthouse の Doctype 監査が失敗する原因

<!DOCTYPE html> 宣言が存在しない場合、Lighthouse はページにフラグを設定します。

Doctype がないことを示す Lighthouse 監査

Each Best Practices audit is weighted equally in the Lighthouse Best Practices Score. Learn more in The Best Practices score.

Doctype 宣言を追加する方法

<!DOCTYPE html> 宣言は HTML ドキュメントの先頭に追加します。

<!DOCTYPE html>
<html lang="en">

詳細については、MDN の Doctype ページをご覧ください。

リソース

更新日 記事を改善する

This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.