Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
369
Help us understand the problem. What is going on with this article?
@wadako111

<html>,<body>は要らない?Googleが推奨するHTMLファイルの記法

More than 5 years have passed since last update.

Googleが公開していたGoogle HTML/CSS Style Guideによると、よく使われる下のようなHTMLのお決まりの記法は非推奨らしい。

not_recommended.html
<!DOCTYPE html>
<html>
  <head>
    <title>Spending money, spending bytes</title>
  </head>
  <body>
    <p>Sic.</p>
  </body>
</html>

これはファイル容量のために下のように書くべき。

recommended.html
<!DOCTYPE html>
<title>Saving money, saving bytes</title>
<p>Qed.

つまりhtml, head, bodyなどの使い慣れたお決まりのタグは今更書くまでもないということ。

参考: どのようなタグが省略可能か
http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#syntax-tag-omission

P.S.
STORYS.JPcoincheck などのサービスを運営、開発しています。興味のある方はぜひ 和田まで連絡を!

369
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
wadako111
ストーリー投稿サイトSTORYS.JP http://storys.jp とビットコイン系サービス https://coincheck.jp を運営、開発しています。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
369
Help us understand the problem. What is going on with this article?