Skip to content
TBSI.

Start here

  • LLM LeaderboardCompare frontier models on intelligence, price and speedTool
  • What is the best superintelligence?The best frontier model for each jobModels
  • Frontier Gap ReportHow far apart the leading labs areReport
  • MethodologyHow we verify sources, data and claimsAbout

Best Claude Code Prompts to Improve Your Homepage (2026)

Eight prompts that audit a homepage for structure, accessibility, speed and mobile layout, then sort the fixes by risk

By TheBestSuperintelligence Editorial TeamUpdated

Best Claude Code prompts for a homepage

8 Claude Code prompts to improve your homepage, to copy and adapt

Full brief
You are a senior frontend developer who specialises in semantic HTML and accessibility. Here is the current HTML of my homepage: [PASTE YOUR HTML OR NAME THE FILE]. Stack: [YOUR STACK, E.G. NEXT.JS, WORDPRESS, PLAIN HTML].

Check: 1. whether the heading levels are logical, 2. whether landmark elements such as header, nav, main and footer are used correctly, 3. which parts would benefit from better semantic elements, 4. accessibility or search risks the structure creates. Propose a cleaner structure for the main sections without changing the visual design or inventing content. Return current issues, the recommended structure with short reasons, and a High, Medium or Low priority for each change.
Advanced
You are a senior frontend developer focused on loading speed. Here is my hero section and its CSS: [PASTE HERO HTML AND CSS OR NAME THE FILES].

Improve it for a clear visual hierarchy, a fast Largest Contentful Paint, good accessibility (contrast, focus, alt text) and clean markup, mobile first. Do not invent content or features. Return the current problems, improved HTML, key CSS recommendations, notes on images and fonts, and accessibility notes.
Advanced
You are an accessibility specialist working to WCAG 2.2 Level AA. Audit this homepage HTML: [PASTE YOUR HTML OR NAME THE FILE].

Cover semantic structure, heading levels, images and alt text, form labels and errors, colour contrast risks if CSS is supplied, keyboard order and focus, correct use of ARIA, and touch target sizes. Return critical issues, important issues, nice-to-have improvements and concrete code for the most important problems. Comment only on what is in the code.
Advanced
You are a performance engineer who specialises in Core Web Vitals. Review this homepage code: [PASTE HTML AND ANY CSS OR SCRIPT TAGS, OR NAME THE FILES].

Look for what could delay the largest element, layout shifts, JavaScript that delays interaction, image and font loading, render-blocking resources and unnecessary third-party scripts. Return the highest-impact problems, recommendations ranked by impact against effort, example code for the top fixes, and which metrics to measure afterwards.
Specialized
You are a senior frontend developer who values clean, maintainable markup. Here is the current homepage markup: [PASTE HTML OR NAME THE FILE].

Rewrite it with the same content and the same visual result, using modern semantic HTML, fewer unnecessary wrappers and clearer nesting. Keep class names that belong to a design system. Return a short list of the improvements, the cleaned markup, and what you deliberately left unchanged and why.
Specialized
You are a frontend developer with strong accessibility skills. Here is the form and call-to-action section of my homepage: [PASTE HTML OR NAME THE FILE].

Improve the markup so that every field has a label, focus order is sensible, buttons and links use the right elements, and error and success states have a clear structure. Do not add fields or change the business logic. Return the improved HTML and a short list of the changes.
Specialized
You are a mobile-first frontend developer. Review this homepage structure and CSS for small screens: [PASTE HTML AND CSS OR NAME THE FILES].

Check content order, navigation, the hero and calls to action, touch target sizes, horizontal scrolling, and font sizes and spacing on narrow viewports. Propose fixes that keep the desktop layout intact and say which need testing on a real device.
Full brief
From all the recommendations you have made about this homepage, build a three-column plan: safe to apply now, needs testing first, better to delegate or do in a larger refactor. For each action give the expected benefit (accessibility, speed, search, maintainability), the risk, the effort, and what to test or measure afterwards. Prefer small, reversible changes.

How to audit a homepage with Claude: what to add

  • Real code, not a description. Anthropic says Claude responds well to clear, explicit instructions and advises adding context. In Claude Code, point it at the files (for example @src/app/page.tsx) instead of pasting them.
  • The stack and the constraints. Name the framework, the design system and what must not change: forms, tracking, redirects, pages that already rank.
  • The goal and the known problem. A slow first screen, a failed accessibility check and a confusing menu need different audits.
  • One area per prompt. The prompts split structure, hero, accessibility, speed, markup, forms and mobile because one request for everything returns shallow advice.
  • A request to rank. The last prompt separates safe edits from risky ones, so you do not rebuild a page that already works.

Worked example: AI prompts for homepage HTML, filled in

The page below is invented for this example.

Text
You are an accessibility specialist working to WCAG 2.2 Level AA. Audit this homepage HTML: @index.html. Stack: plain HTML and one CSS file, @styles.css. The page has a hero with a background image, a three-card services grid and a contact form with name, email and message fields. Cover semantic structure, heading levels, images and alt text, form labels and errors, colour contrast, keyboard order and focus, ARIA and touch targets. Return critical issues, important issues, nice-to-have improvements and concrete code for the most important problems. Comment only on what is in the code.

A good result for this prompt:

  • Quotes the actual lines it is talking about, not general advice.
  • Treats a missing form label as critical and says why, rather than listing it among style points.
  • Gives contrast ratios it computed from your CSS values, so you can recompute them.
  • Leaves ARIA out where a native element already does the job.
  • Says what it could not check from the code, such as how the page behaves in a screen reader.

Accessibility and Core Web Vitals prompt for AI: check the output

Run the page in a browser; a model's claim that code is fixed is not a test.

  • Speed targets. web.dev says a page should reach Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint of 200 milliseconds or less and Cumulative Layout Shift of 0.1 or less, measured at the 75th percentile of page loads across mobile and desktop.
  • The hero image. web.dev warns never to lazy-load the LCP image, and shows preloading it with a high fetch priority. If a suggestion adds loading="lazy" to the hero, reject it.
  • Labels. WCAG 3.3.2 requires labels or instructions for inputs, and 1.3.1 requires structure shown visually to be available in the code.
  • Contrast, focus and targets. WCAG 2.2 sets 4.5:1 for text contrast, a visible keyboard focus indicator and 24 by 24 CSS pixel pointer targets, with exceptions. Check these in the browser.
  • Rollback. Work on a branch, apply one change at a time and keep forms, tracking and redirects under test.

The full prompt library is on our prompt library page.

Limits of this guide

These are our own untested prompts. A model reads only the code you give it, so it cannot see rendering, real network speed, third-party scripts or behaviour in assistive technology. Nothing here shows that any prompt improves rankings or conversions. Verify every change with real tools, and keep a backup before editing a live site.

Sources & Further Reading

All sources fetched on 2026-11-15, except where a row says otherwise.

Claim Source Section or date
Claude responds well to clear, explicit instructions; add context to improve performance Prompting best practices (Anthropic) Be clear and direct; Add context; undated
LCP within 2.5 s, INP 200 ms or less, CLS 0.1 or less, at the 75th percentile of page loads Web Vitals (web.dev) Core Web Vitals thresholds; undated
Never lazy-load the LCP image; preload it with a high fetch priority Optimize Largest Contentful Paint (web.dev) Resource load delay; undated
Labels or instructions must be provided for inputs Understanding SC 3.3.2 (W3C) Labels or Instructions (Level A)
Information and structure shown visually must be available in the code Understanding SC 1.3.1 (W3C) Info and Relationships (Level A)
4.5:1 text contrast; visible keyboard focus; 24 by 24 CSS pixel pointer targets WCAG 2.2 (W3C) SC 1.4.3, 2.4.7, 2.5.8; fetched 2026-10-22

Need a different task?

Browse all 58 tasks and 345 prompts, with search and level filters.

Open the prompt library →

Frequently asked questions

What are the best Claude Code prompts to improve your homepage?

Give Claude your real homepage code, stack and constraints, then audit one area per prompt: structure, hero, accessibility, speed, forms and mobile. Finish with fixes sorted into safe now, test first and delegate, and verify each in a browser.

Should I paste the full HTML into Claude?

Paste what the audit needs: the hero, main sections, forms and the CSS or class names that style them. In Claude Code, name the files instead of pasting. Anthropic says Claude responds well to clear, explicit instructions, so also state the stack, the goal and what must not change.

Which speed targets should I ask Claude to meet?

Ask for the Core Web Vitals targets web.dev publishes: Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint of 200 milliseconds or less, and Cumulative Layout Shift of 0.1 or less, measured at the 75th percentile of page loads. Then measure with real tools, because a model cannot run your page.

How we sourced this. The prompts are our own untested starting points; we did not measure which wording performs best. Thresholds are as printed on the web.dev and W3C pages on the date shown. Methodology