Skip to content

Semantic HTML is a silver bullet, mostly

People say there is no silver bullet, but semantic HTML comes close. Well-crafted HTML makes accessibility, SEO, web data analytics, usability, E2E testing, and writing CSS easier all at once.

  • Using semantic elements well and adding appropriate ARIA attributes where needed can ensure a basic minimum of accessibility.
  • Web crawlers understand landmark elements (main, nav, header, footer, and so on), so semantically correct markup also helps search engines understand it.
  • There is almost no need to tag things manually for Google Analytics.
  • Usability, including keyboard navigation, improves along with it.
  • Writing E2E testing scripts (for example, with Playwright) becomes easier, and tests can read as smoothly as specifications.
  • Meaningful CSS selectors become available. In the near term, this helps maintenance; in the longer term, it enables designs that express intent more clearly. (See Declarative design and design runtime.)

One example of the principle of “going with the grain” discussed in Tasteful software.

Created
Updated

Machine-translated from the Korean original.

2026 © ak | markdown | 한국어