# HTML coding guide ## Naming conventions - Everything should be named in `kebab-case` (lowercase words separated with a `-`): tags, attributes, IDs, etc, **except for everything bound to Angular** such variables, directives or events which should be in `camelCase` - File names should always be in `kebab-case` ## Coding rules - Use HTML5 doctype: `` - Use HTML [semantic elements](https://developer.mozilla.org/docs/Web/HTML/Sections_and_Outlines_of_an_HTML5_document) - Use double quotes `"` around attribute values in tags - Use a new line for every block, list, or table element, and indent every such child element - Clearly Separate structure (HTML) from presentation (CSS) from behavior (JavaScript): - Never use inline CSS or JavaScript - Keep any logic out of the HTML - `type` attribute for stylesheets and script tags should be omitted ## Common pitfalls - **Block**-type tags cannot be nested inside **inline**-type tags: a `