/    Sign up×
Community /Pin to ProfileBookmark

Google HTML/CSS Style Guide

Just saw a link to this on Twitter: [url=https://google.github.io/styleguide/htmlcssguide.xml]Google HTML/CSS Style Guide[/url]. I had referenced it in [url=http://www.webdeveloper.com/forum/showthread.php?358803-Any-genius-Does-lt-link-gt-in-lt-body-gt-still-require-property-quot-stylesheet-quot]another thread here[/url] and thought maybe it deserved its own thread here for any related discussion.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulSep 18.2016 — I've had a look and the only things I disagree with are:

HTML - omission of "optional" TAGS

In my opinion the idea that structural tags (like <body>) are optional is wrong, hence they should not be omitted.

CSS - order of declarations

I see the sense in alphabetising them, it is better than a random order, but is not optimal. To me they have a natural order of importance. E.g. position (if specified) should come first. It is the context in which the remaining properties are to be understood.
Copy linkTweet thisAlerts:
@Kevin2Sep 25.2016 — For a while HTML5 was like Christmas. We had all these shiny, fun, new toys to play with. Buried way back under the tree, however, was a package of socks. No one likes to get socks for Christmas (actually I do ?) so they got ignored, and they got put in a drawer to bring out later. After all, socks are so -- basic -- and besides, our old socks were still fine. We'd been wearing that same type of socks for a long time. Yeah, the color changed, or we went from striped to argyle, but the old socks served us well. Besides it was a lot more fun to play with all those new toys. How do I put them together? What can I do with them? Can I make that RC car do a flip? And we could play with those new toys while wearing old socks.

The new toys are now ... just toys. No longer shiny and new. But the old socks are getting a bit worn. Time to dig through the drawer and find the socks we got for Christmas a while back. Hmm. These are different. Lighter weight, new material, and yet still do the same thing the old socks did. Aunt Mabel gave us more than we thought she did a couple of years ago!

Yep, socks are pretty basic, but it doesn't hurt to try out new ones.

Maybe the better analogy is boots vs. sandals and whether or not you even need socks. Pretty much not optional with boots, but optional with sandals.
Copy linkTweet thisAlerts:
@cootheadSep 26.2016 — [indent]

It is a pity that [color=navy][i]"Google"[/i][/color] do not practise what they preach. :eek:

Of course, we may accept...

[indent][color=navy][i]"Do as I say, not as I do"[/i][/color][/indent]

...instructions from those whom we admire and respect, but from [color=navy][i]"Google"[/i][/color]....

[/indent]

[i]coothead[/i]
×

Success!

Help @NogDog spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ,
analytics: Fullres
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Marika,
tipped: article
amount: 1000 SATS,

tipper: @hatem774,
tipped: article
amount: 1 SATS,

tipper: @nearjob,
tipped: article
amount: 1000 SATS,
)...