---
name: semantic-html-and-seo
description: Semantic HTML5, SEO basics, alt text, progressive enhancement and SPA concerns. Use when building web UI, reviewing markup or optimising for search.
metadata:
priority: 8
pathPatterns:
- "**/*.html"
- "**/*.tsx"
- "**/*.jsx"
- "**/*.vue"
- "**/*.svelte"
- "app/**"
- "pages/**"
- "src/**"
promptSignals:
phrases:
- "seo"
- "semantic html"
- "alt text"
- "meta tags"
- "progressive enhancement"
- "spa"
- "open graph"
- "structured data"
- "html5"
- "localstorage"
- "sessionstorage"
- "personalization"
- "remember user preference"
retrieval:
aliases:
- seo
- semantic html
- alt text
- progressive enhancement
- html5 best practices
- meta tags
- open graph
- structured data
- spa seo
- client-side storage
- localStorage personalization
intents:
- improve seo
- add alt texts
- write semantic html
- optimise for search engines
- add open graph tags
- make spa crawlable
- persist user preferences client-side
- personalise based on stored state
examples:
- add proper meta tags to this page
- write semantic html for this component
- how do I make this SPA SEO friendly
- add alt texts to all images
- remember the user's last view with localStorage
- personalise this returning-user experience
---
# Semantic HTML and SEO
Good HTML is not just markup — it is the contract between your content, search engines, assistive technologies, and the browser. Semantic HTML, correct metadata, and progressive enhancement make UI resilient, findable, and accessible by default.
---
## Semantic HTML5
Use the element that describes the content's meaning, not just its appearance.
### Document structure
```html