Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 1.47 KB

html.textile

File metadata and controls

62 lines (41 loc) · 1.47 KB

HTML Code Style

Doctype

All HTML should be written using the HTML 5 strict doctype.

<!DOCTYPE html>

Element IDs

Element IDs should be written in dash-case, meaning that all letters are lowercase and words are separated with dashes ( _word1-word2-word3 _). Examples:

  • my-header
  • sky-layout
  • page-nav

Do not use any characters other than letters, numbers, and dashes.

Form Element Names

Form elements names should be written in underscore.

Indentation

HTML code should be indented as appropriate by 4 spaces (no tabs).

Semantic Markup

HTML code should be, as much as is possible and practical, semantically significant. This means that the markup represents the data appropriately regardless of its appearance. This is necessary for accessibility purposes.

Don’t Use These Tags

Do not use these html elements in html pages.
Presentational elements should not be used.
Support for some elements has been (or will be) deprecated; they should not be used.

Presentational

  • b
  • big
  • hr
  • i
  • small
  • sub
  • sup
  • tt

Deprecated

  • basefont
  • center
  • dir
  • font
  • isindex
  • menu
  • s
  • strike
  • u

User Actions (Discuss)

Any user action should be represented by a link. If there is no valid URL associated with the action, the href attribute should be set to _javascript:void(0) _. Using “#” can cause issues in some browsers should the link be clicked before JavaScript is attached to the action.