Skip to main content

Copy of some Draft Web Development Guidelines

Code must follow good semantic practices

HTML semantics are important. They don't just play a key role in making the Web look the way it does, they have a function in accessibility, SEO, and even in sustainability. Ensuring that you markup your content correctly and avoid cluttering your markup wastefully will reduce emissions.

Criteria: Semantic code

Machine-testable

Content must be accurately marked up according to the relevant standard(s).

Resources

Criteria: Optional features

Machine-testable

Remove optional HTML tags, attribute quotes, and default attributes only when they do not negatively impact functionality, accessibility, or readability. Retain them when they enhance accessibility, maintain clarity (without compromising on performance), or ensure consistent browser rendering.

Resources

Criteria: Avoid non-standard code

Machine-testable

Avoid using non-standard elements or attributes.

Resources

Criteria: Custom code

Human-testable

Prefer using standard HTML elements and attributes. Only use custom elements or Web Components if you cannot utilize native HTML elements or if you need tightly regulated control over the implementation of design system components..

Resources

Impact: Medium, Effort: Medium

GRI Impact of Code must follow good semantic practices
GRI Impact
materials Medium
energy Medium
water Medium
emissions Medium
Benefits of this guideline
  • Environment: Sites with bloated markup waste data, also sites with broken markup could trigger memory leaks (performance issues) in apps, and following standards ensures sites will work the same across devices and platforms (reducing bugs, developer fix time, and resource waste).
  • Accessibility: Semantic HTML is a great stepping stone towards making your content easier to navigate by assistive technologies. Many tags within HTML come with pre-loaded context about what is expected within them (reducing the need for ARIA or other descriptive features). This can also help browsers, search engines, social networks, and other "blind" technologies understand your websites or applications better. This can help you reduce barriers in terms of content navigability.
  • Performance: Deprecated code isn't optimized within rendering engines, and while Web components do outperform framework components, they won't beat the native HTML elements they build upon.
  • Economic: Inaccessible sites can lead to lawsuits, avoiding these is beneficial to any website owner.
  • Conversion: Poorly coded sites may break features for visitors, leading to website abandonment.

Example

Tags: