Skip to content

HTML CSS convention

weblancaster edited this page Dec 2, 2014 · 4 revisions

For

  • Maintainability
  • Reduce the effort needed to read and understand source code
  • Enhance source code appearance (for example, by disallowing overly long names or unclear abbreviations).

Please follow the Architecture/Convention showed below.

Try see everything as a component the CSS file must be a separate file inside this folder

lowerCamelCase with snake_case name convention.

e.g:

HTML:

<div class="searchBox">
<label id="search" class="searchBox_inner">
<input type="text" class="searchBox_inner_field">
</label>
<input type="button" value="submit" class="searchBox_sendButton">
</div>

CSS:

.searchBox {}
.searchBox_inner {}
.searchBox_inner_field {}
.searchBox_button {}