Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.34 KB

html.md

File metadata and controls

37 lines (24 loc) · 1.34 KB

LiveBy HTML Standard Style

Our team strives to write semantic HTML to provide clear and organized markup for structuring content in web pages.

The canonical source for semantic HTML is the HTML specification, a living document, created by Web Hypertext Application Technology Working Group (WHATWG).

The HTML specficiation

Specific Formatting Rules

For suggestions on semantic sectioning elements:

HTML5 sectioning elements flowchart

The following guidelines are adapted from the PrimerCSS's HTML Styleguide

  • Paragraphs of text should always be placed in a <p> tag. Never use multiple <br> tags.
  • Items in list form should always be in <ul>, <ol>, or <dl>. Never use a set of <div> or <p>.
  • Every form input that has text attached should utilize a tag. Especially radio or checkbox elements.

Lean markup

Whenever possible, avoid superfluous parent elements when writing HTML. Many times this requires iteration and refactoring, but produces less HTML. For example:

<!-- Not so great -->
<span class="avatar">
  <img src="...">
</span>

<!-- Better -->
<img class="avatar" src="...">