Check and fix typography hierarchy on a page...
Audit and fix typography structure in page sections. Ensures proper heading hierarchy, left-aligned section headers, and consistent max-width constraints.
<p> description - if not, ADD one<div className="max-w-3xl mb-10">Problem: Many sections have only an h2 heading without a description paragraph.
Rule: EVERY section (except Hero/CTA) must have:
<div className="max-w-3xl mb-10">Check for these patterns and FIX them:
// WRONG: h2 alone without p
<h2>{t("title")}</h2>
<div className="grid">...</div>
// WRONG: h2 with spacing classes but no p
<h2 className="mb-12">{t("title")}</h2>
// WRONG: motion.h2 alone
<motion.h2 ...>{t("title")}</motion.h2>
// CORRECT: h2 + p in wrapper
<div className="max-w-3xl mb-10">
<h2>{t("title")}</h2>
<p className="mt-4">{t("description")}</p>
</div>
Only the Hero section should have h1. All other sections use h2 for their main title.
Every section (except Hero and CTA) must have this header structure:
<section className="py-16 lg:py-24">
<div className="container">
{/* Section Header - LEFT ALIGNED */}
<div className="max-w-3xl mb-10">
<h2>{t("title")}</h2>
<p className="mt-4">{t("description")}</p>
</div>
{/* Section Content */}
...
</div>
</section>
Required:
max-w-3xl on header wrapper (768px max-width)mb-10 spacing before contentmt-4 between h2 and pWhen fixing section headers, remove these classes:
text-center
items-center
justify-center
flex items-center justify-center
mx-auto
text-center
text-center
className="max-w-3xl mb-10"
className="mt-4"
These section types should remain centered:
Skip these when auditing.
When adding missing description, add to both de.json and en.json:
{
"sectionKey": {
"title": "Existing Title",
"description": "[ADD DESCRIPTION HERE]"
}
}
Before (projects5.tsx):
<h2>{t("title")}</h2>
...
<h4>{project.title}</h4> // WRONG: h2 โ h4
After:
<h2>{t("title")}</h2>
...
<h3>{project.title}</h3> // CORRECT: h2 โ h3
Before (compare5.tsx):
<div className="text-center">
<h2>{t("title")}</h2>
<p className="mx-auto mt-4 max-w-3xl">{t("description")}</p>
</div>
After:
<div className="max-w-3xl mb-10">
<h2>{t("title")}</h2>
<p className="mt-4">{t("description")}</p>
</div>
Before (faq9.tsx):
<motion.h2
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
viewport={{ once: true }}
className="mb-12 mt-2"
>
{t("title")}
</motion.h2>
<Accordion>...</Accordion>
After:
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
viewport={{ once: true }}
className="max-w-3xl mb-10"
>
<h2>{t("title")}</h2>
<p className="mt-4">{t("description")}</p>
</motion.div>
<Accordion>...</Accordion>
i18n addition:
{
"faq": {
"title": "Hรคufige Fragen",
"description": "[ADD: Brief intro text about the FAQ section]"
}
}
Before (projects5.tsx):
<div className="container">
<h2 className="uppercase">{t("title")}</h2>
<div className="mt-10 grid">...</div>
</div>
After:
<div className="container">
<div className="max-w-3xl mb-10">
<h2>{t("title")}</h2>
<p className="mt-4">{t("description")}</p>
</div>
<div className="grid">...</div>
</div>
Note: Remove uppercase and spacing classes from h2, move animation to wrapper if needed.
Before:
<motion.h2 initial={...} whileInView={...} className="mb-8">
{t("title")}
</motion.h2>
After:
<motion.div initial={...} whileInView={...} className="max-w-3xl mb-10">
<h2>{t("title")}</h2>
<p className="mt-4">{t("description")}</p>
</motion.div>
Rule: Move Framer Motion props from h2 to the wrapper div.
After running this skill, report: