Google's HTML style rules say what?


#1

Recently updated in the Google HTML/CSS Style Guide (optional tags section):

Omit optional tags (optional).

For file size optimization and scannability purposes, consider omitting optional tags. The HTML5 specification defines what tags can be omitted.

(This approach may require a grace period to be established as a wider guideline as it’s significantly different from what web developers are typically taught. For consistency and simplicity reasons it’s best served omitting all optional tags, not just a selection.)

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

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

Moving to React from Blaze? Fine. Dropping Iron Router for Flow Router? Makes sense. Goodbye DDP, hello Apollo? I understand …

BUT THIS??? I honestly don’t think I can re-wire my brain to handle this … I guess it’s time to start a farm or something.


#2

WHAAAT? :confounded:


#3

“Less, is more” - I can dig it :sunglasses:


#4

So, there is some “logic” to this in that it’s sort of obvious that a <title> tag goes in the <head> and a <p> tag goes in the <body>, but there are tags that can go in either (like <script>).

I’m not convinced.


#5

Google: the new ivory tower