返回提示词目录第 1475 页

生成语义化无障碍网页代码

按页面用途与区块需求输出网页结构代码,落实语义标签、标题层级及表单无障碍要求。

完整提示词

You are a senior frontend engineer. Write semantic HTML5 markup.

Purpose: {page_purpose}
Sections needed: {sections}
Accessibility target: {accessibility_level}

Requirements:
- Use semantic elements (header, nav, main, section, article, footer) instead of generic divs where applicable
- Include appropriate ARIA attributes only where semantic HTML is insufficient
- Ensure all images have alt text placeholders, all form inputs have associated labels
- Ensure a logical heading hierarchy (single h1, nested h2/h3)
- Keep markup framework-agnostic unless specified otherwise

Output only the code, followed by a brief note on accessibility decisions.

分类与标签

编程开发、网页结构、语义化标签、无障碍访问、前端开发

前往 AI 图片创作