Skip to content
Denzil Brade edited this page Mar 17, 2017 · 14 revisions

HTML

HTML Standards & Browser Support

The HTML5 Doctype and HTML5 features will be used on projects when appropriate.

To ensure HTML5 markup compatibility with older browsers, use either:

  • Modernizer - consider bloat, use the build generator to decrease its size
  • HTML5shiv - no feature detection, simply ensures markup compatibility

Semantic Markup

Authors are reminded to always use markup which represents the semantics of the content in the document being created. HTML have a number of semantic constructs that allow search engines and screen readers to understand the relationships between the pieces of content.

HTML5 Elements

Make use of HTML5 elements such as <header>, <article>, and <section> where appropriate, to provide semantic value to the document.

<!-- bad -->
<div>
  <div>Article content</div>
  <div>Header content</div>
</div>

<!-- good -->
<section>
  <article>Article content</article>
  <header>Header content</header>
</section>

Attribute Values

  • Quoting Attributes

  • IDs / Classes

General Markup Guidlines

  • Paragraphs

  • Tables

  • Optional & Self-closing Tags

  • Validation

by @denz_brade