Google's HTML style rules say what?

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>
    <title>Spending money, spending bytes</title>

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

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.


WHAAAT? :confounded:


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


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.

1 Like

Google: the new ivory tower