These guidelines will govern how we write frontend code for The Spruce (and hopefully beyond!)
- Author semantic markup - HTML gives structure to content, and browsers, search engines, and assistive devices make use of that structure to benefit users. Headings should be
<h1>
through<h6>
tags, groups of objects should be marked up as<ul>
or<ol>
tags, and so on. - Legibility - Markup should be easily readable by authors, especially considering that markup is often mixed with Freemarker and other non-HTML code. Use proper spacing, naming, and commenting conventions to keep code legible for yourself and your teammates.
- Bake in accessibility - Incorporate accessibility best practices into markup as you author markup rather than tacking it on as an afterthought.