Skip to Main Content
Sustainable Web Design Logo
  • Home
  • Guidelines
  • Emissions
  • Ratings
  • Contact

◂ Web Development guidelines

3.6 Ensure code follows good semantic practices

Web Development

Use standards-compliant HTML and web platform features, and avoid unnecessary complexity or non-standard code.

Success Criteria

  • Semantic code:
    Use valid and standards-compliant markup.
  • Optional features:
    Remove optional HTML elements, attribute quotes, and default attributes if doing so does not negatively impact accessibility, readability, functionality, or performance. Include them when they improve accessibility, maintain clarity without compromising performance, or ensure consistent browser rendering.
  • Avoid non-standard code:
    Avoid deprecated, proprietary, or non-standard technologies unless there is a clear, justified need such as legacy compatibility or accessibility. Use polyfills only when necessary and review them regularly for removal.
  • Custom code:
    Use standard HTML elements, attributes, features, and APIs wherever they meet the requirement. Use custom elements, Web Components, or custom functionality only when built-in web platform capabilities cannot meet the need or when building reusable design system components.

View the Guideline

Tags

AccessibilityCompatibilitySocial EquityUsabilityContentHTMLSecurity

Share

More web development guidelines

3.1 Set goals based on performance and energy impact

Web Development

3.2 Minify and remove unused code

Web Development

3.3 Modularize bandwidth-heavy components

Web Development

Learn about W3C’s Sustainable Web Interest Group:

A global community advancing sustainability on the web.

Explore the group

This site is brought to you by

Mightybytes Wholegrain Digital
Website Carbon

This page loaded in 0.25 seconds and emitted just 0.5g of CO2

Visit Website Carbon
Ecograder

How green is your website?

Visit Ecograder
© Copyright Sustainable Web Design 2026. Privacy Policy.