[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
369
367

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2013-06-20

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
367
13

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
369
367

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?