HTML と CSS のコーディングガイドライン
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
2012年7月12日木曜日
優れたコードは効果的で、効率的で、保守性に優れ、洗練されているものです。時には会社すらまたがるような大勢の開発者間やチーム間でコーディングを進める場合、コードには一貫性があり、理解しやすいものでなければなりません。それを実現するために、スタイルガイドがあります。Google では様々な言語のスタイルガイドを使用していますが、その中で Google が最近公開したものが、
Google HTML/CSS Style Guide
(英語)です。
この HTML & CSS Style Guide は、
Google の他のスタイルガイド
と同様に、インデントのようなフォーマットのルールに関するガイドから、さらに進んで開発者はコードをこう書くべしという現実的なベストプラクティスが記述されています。スタイルガイドを書く側からすると、現実的なコードの書き方を基軸にするか、理想的なスタイルを基軸にするかのどちらがいいか、というところがスタートポイントになることが多いのですが、Google の HTML/CSS Style Guide はその両方を満たすように書いています。
この最新版のスタイルガイドを今回みなさんにご紹介しますので、ぜひご活用いただければと思います。将来的にはその設計思想やアップデートについてもお知らせしたいと思います。
この記事に関するコメントやご意見・ご感想は、
ウェブマスター ヘルプフォーラム
までお寄せください。
Written by Jens O. Meiert, Senior Web Architect, Google Webmaster Team
Original version:
Coding guidelines for HTML and CSS
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2012-07-01 UTC。
[null,null,["最終更新日 2012-07-01 UTC。"],[[["\u003cp\u003eGoogle has released a new public HTML and CSS Style Guide to encourage consistency and understanding across projects.\u003c/p\u003e\n"],["\u003cp\u003eThe style guide addresses formatting and best practices, aiming to guide developers beyond basic indentation.\u003c/p\u003e\n"],["\u003cp\u003eIt reflects a mix of descriptive and prescriptive approaches to coding style, acknowledging diverse development styles.\u003c/p\u003e\n"],["\u003cp\u003eGoogle encourages feedback on the new style guide and allows its use for external projects.\u003c/p\u003e\n"]]],["Google released its public HTML and CSS Style Guide, joining other Google style guides. This guide covers formatting and best practices to promote consistent, understandable code among multiple developers and teams. The guide includes both descriptive and prescriptive elements, acknowledging varied development styles. Google encourages developers to use the guide in their projects and welcomes feedback for future updates. The guide's design decisions will be discussed further.\n"],null,["# Coding guidelines for HTML and CSS\n\nWednesday, May 02, 2012\n\n\nGreat code has many attributes. It's effective, efficient, maintainable, elegant. When working on\ncode with many developers and teams and maybe even companies, great code needs to also be\nconsistent and easy to understand. For that purpose there are style guides. We use style guides\nfor a lot of languages, and our newest public style guide is the\n[**Google HTML and CSS Style Guide**](https://google.github.io/styleguide/htmlcssguide.html).\n\n\nOur HTML and CSS Style Guide, just like\n[other Google style guides](https://code.google.com/p/google-styleguide/),\ndeals with a lot of formatting-related matters. It also hints at best practices so to encourage\ndevelopers to go beyond indentation. Many style guide authors know the underlying motivation from\nthe question whether to *describe* the code they write---or to *prescribe*\nwhat code they want to write. Not surprisingly then, in our HTML and CSS style guide you'll find\nboth (as much as you'll still find a lot of different development styles in our not entirely small\ncode base).\n\n\nAt this time we only want to introduce you to this new style guide. We hope to share more about\nits design decisions and future updates with you. In the meantime please share your thoughts and\nexperiences, and as with the other style guides, you can use our style guide for your own\nprojects, as you see fit.\n\n\nWritten by\n[Jens O. Meiert](https://plus.google.com/114697646623413794481/about),\nSenior Web Architect, Google Webmaster Team"]]