HTML Code Review Checklist ~ Web CodeHelpers

HTML Code Review Checklist

This checklist represents a subset of the HTML Code Conventions that should be verified during code reviews. For more information about any of the checklist items, please refer to the HTML Code Conventions.
When reviewing JavaScript code, make sure to answer the following questions:
  • Is the code properly formatted in terms of white space and syntax conventions?
  • Are semantic elements used? Don't use <div> and <span> elements unless necessary; avoid empty <div> and <span> elements.
  • Do <script> and <link> elements have unnecessary "type" attributes? The "type" attribute is unnecessary in normal usage.
  • Do all input fields have explicit <label> elements? All form elements should; ensure proper association with "for" and "id" attributes.
  • Do all input fields have appropriate (and not duplicated) names? Only radio buttons should have the same name if they represent multiple possible values for a single field.
  • Are inline styles and scripts kept to a minimum? As much JavaScript and CSS code should be in external files as possible, not inside of HTML.
  • Does the page have just one <h1> element and use proper heading structure? The page should have a logical outline based on the headings.
  • Are appropriate ARIA landmark roles being used? Is there one "main", "banner", "contentinfo", and 3 or less "navigation" roles?
  • Is JavaScript being included at the bottom of the page and CSS at the top? As much as possible, this should be the case.
  • Is the code free of deprecated/obsolete tags?
  • Do all <fieldset> elements have a <legend>? They should. Use to segment long forms and for radio/checkbox groups.
  • All <image> elements must have an "alt" attribute. Decorative images should have an empty value.
  • Is the code free of HTML comments? Use template-level comments instead.
  • Is the code valid HTML5? Use the HTML validator.
Higher-level questions:
  • Is the code accessible?
  • Does the code use as little code as possible to achieve the goal?
  • Are there any obvious bugs?


Post a Comment

Subscribe updates via Email