Code Guide is a set of standards for developing consistent, flexible, and sustainable HTML and CSS. It comes from years of experience writing code on projects of all sizes. It's not the end-all be-all, but it's a start. Don't capitalize tags, including the doctype. Use soft tabs with two spaces, they're the only way to guarantee code renders the same in any environment. Nested elements should be indented once (two spaces). Always use double quotes, never single quotes, on attributes. Don't include a trailing slash in self-closing elements, the HTML5 spec says they're optional. Don’t omit optional closing tags (e.g. </li> or </body>). Enforce standards mode and more consistent rendering in every browser possible with this simple doctype at the beginning of every HTML page. Authors are encouraged to specify a lang attribute on the root html element, giving the document's language. This aids speech synthesis tools to determine what pronunciations to use.

Features

  • IE compatibility mode
  • Character encoding
  • Syntax
  • HTML5 doctype
  • Language attribute
  • Boolean attributes
  • And many more

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Code Guide

Code Guide Web Site

nel_h2
Keep company data safe with Chrome Enterprise Icon
Keep company data safe with Chrome Enterprise

Protect your business with AI policies and data loss prevention in the browser

Make AI work your way with Chrome Enterprise. Block unapproved sites and set custom data controls that align with your company's policies.
Download Chrome
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Code Guide!

Additional Project Details

Registered

2021-07-21