Web Design

Website Style Guide: What to Include, With Rules You Can Test

Search for website style guide and you find brand guide examples, templates and builders' how-tos. They tell you what sections to include. This guide is about the part they skip: writing each rule so that someone can check a page against it and say yes or no.

Website Style Guide: What to Include, With Rules You Can Test

Key takeaways

  • A website style guide is a set of rules for how pages look and read. Webflow's guide describes it as setting rules for colour, typography and UI components so the site stays consistent in visuals and content.
  • Write rules you can test. "Use our blue for buttons" cannot be checked. "Primary buttons use #1D4ED8 with white text, a contrast ratio of 6.7 to 1" can.
  • Brand colours are not exempt from contrast rules. The W3C's explanation of WCAG 1.4.3 says that beyond logos and logotypes, text with insufficient contrast because of corporate identity or brand guidelines is not exempted.
  • Define states, not only defaults. A button has default, hover, focus, pressed and disabled looks. The guide should show all of them.
  • A short guide that people use beats a long one nobody opens. Aim for one page of rules and one page of examples.

The short answer

A website style guide is the document that tells anyone who builds or edits a page what it should look like and how it should read. It should hold: the colours and what each is for, the type styles and sizes, the spacing scale, the components with their states, the rules for photos and icons, the writing rules for headings, buttons and links, and the accessibility minimums. Put it in one place the team can open, such as a single web page, and keep it in step with the site. If a rule cannot be checked against a page, rewrite it until it can.

About us: Amariq is a web studio. this page shows how we would structure a style guide.

What the search results show, and the gap

We searched Google (US, English) for "website style guide" on 24 November 2026. The first screen was an AI summary and results from Figma, Harvey Mudd College's web standards page, the book Web Style Guide 3, NerdCow (15 September 2023), Wix's "18 brand style guide examples" (19 July 2026), Dribbble, a front-end style guide resource list at styleguides.io and Webflow. We read the Webflow post in full (updated 19 February 2024). The others we saw as snippets; a guessed link to the Harvey Mudd page returned "not found", so we did not use it.

Webflow's six steps are: study the brand, set typography and colour rules, define brand voice and imagery, detail icons and UI elements, guide interaction and navigation, and set layout and spacing. They are sound and brand-led. What the results we saw do not show is how to turn them into rules a developer, an editor and a reviewer can each check. They also do not connect colour choices to the accessibility minimum that applies to them, which is where brand guides most often fail a website.

Website style guide, brand guide, design system: what is the difference?

DocumentWhat it coversWho uses it
Brand guideLogo, colours, voice, imagery, across print and screenAnyone making brand material
Website style guideHow the brand is applied on web pages: colour roles, type scale, spacing, components, content rulesDesigners, developers and editors of the site
Design systemCoded components, tokens, documentation and the process to change themProduct teams with several designers and developers

Webflow calls the website style guide a core component of a larger overarching branding style guide. For a small business site you do not need a full design system. You need the middle row, written well.

The sections, in the order we would write them

1. Colour: roles, not swatches

List each colour with its hex code and, most important, its job. A table works:

RoleUsed forRule
TextBody copy and headingsMust meet 4.5 to 1 against its background
Muted textCaptions, secondary labelsMust still meet 4.5 to 1
SurfacePage and card backgroundsSay which text colours may sit on each
ActionButtons and linksOne colour only, so visitors learn what is clickable
AccentHighlights, one per pageNever used for body text
Success, warning, errorForm and status messagesNever rely on colour alone; add an icon or word

Each pair then gets a contrast figure. The W3C's explanation of WCAG 1.4.3 (read 24 November 2026) sets a contrast ratio of at least 4.5 to 1 for text, and at least 3 to 1 for large text, which it defines as 18 point or 14 point bold, about 24 and 18.5 CSS pixels. It says the ratios are thresholds and should not be rounded, so 4.499 to 1 does not pass.

Here are ratios we calculated on 24 November 2026 with the W3C's relative luminance formula, text on white:

Grey text on whiteContrastPasses 4.5 to 1?
#5959597.0 to 1Yes
#6666665.7 to 1Yes
#7676764.54 to 1Yes, narrowly
#7777774.48 to 1No
#8080803.9 to 1No
#9999992.8 to 1No
#CCCCCC1.6 to 1No

And white text on some common button colours:

Button backgroundWhite text contrastPasses 4.5 to 1?
#1D4ED8 (deep blue)6.7 to 1Yes
#2563EB (blue)5.2 to 1Yes
#3B82F6 (lighter blue)3.7 to 1No
#15803D (deep green)5.0 to 1Yes
#16A34A (green)3.3 to 1No
#E11D48 (rose red)4.7 to 1Yes
#F59E0B (amber)2.1 to 1No; black text on it is 9.8 to 1

These are our own calculations on sample colours, not a statement about any brand. The point for your guide: write the pass or fail next to each colour pair so nobody has to guess. Our website color schemes guide covers choosing the palette itself.

2. Type: a short scale and a reading width

Give the font families, then a named scale, for example heading 1 to 4, body, small. For each give the size, weight and line height at desktop and at mobile. Rules worth writing down:

  • Body text no smaller than a size you choose and can defend, such as 16 px.
  • One H1 per page, headings in order without skipping levels.
  • A maximum line length for body text, so long paragraphs stay readable.
  • What to do with links inside text: underlined, in the action colour.

Webflow's post says typography specifying font types, sizes and spacing keeps content legible and reinforces identity. The step that makes this usable is naming the scale, so a developer writes "heading 2" rather than a pixel value.

3. Spacing and layout

Pick a small set of spacing values and use only those. A scale such as 4, 8, 16, 24, 32, 48 and 64 px, with names like small, medium and large, is easy to remember. Then write down the grid: how many columns, the maximum content width and the page margins at each breakpoint. Webflow's last step says to outline the specific distance between elements; the way to enforce it is to allow only the values on the scale.

4. Components and their states

For each component, show every state. A working list:

ComponentStates to show
Button (primary, secondary)Default, hover, keyboard focus, pressed, disabled, loading
Text linkDefault, hover, focus, visited
Form fieldEmpty, filled, focus, error with message, disabled
NavigationDefault, current page, open on mobile
CardDefault, hover if clickable, focus
MessageSuccess, warning, error, information

The W3C's contrast page says the rule applies to text shown when a pointer hovers over an object or when an object has keyboard focus, and it points to a separate criterion for non-text contrast. It also says an inactive component, such as a disabled button, has no contrast requirement. So your guide can say what a disabled button looks like without it failing the text rule, but it must still show a clear focus state for the rest.

5. Images and icons

Say where photos come from (your own, licensed, stock), what style they share, how they are cropped, what size and format they ship in, and how alt text is written. Pick one icon set and one stroke weight. Webflow's post makes the same point: choose icons that align with one style throughout.

6. Content rules

This is the part brand guides leave vague and editors need most:

  • Headings: sentence case or title case, and a rough length.
  • Buttons: a verb, not "Submit" or "Click here".
  • Links: text that makes sense out of context.
  • Numbers, dates and currency: one format.
  • Tone: three adjectives with one example sentence each. Webflow suggests summarising the brand's attributes into a few adjectives and writing example sentences that embody the voice.
  • Words you avoid.

7. Accessibility minimums

Put the minimums in the guide so they are not an afterthought: the contrast thresholds above, a visible keyboard focus on every interactive element, text that resizes, and a rule against conveying meaning by colour alone. Our website accessibility checklist is a longer list you can adapt.

How to write a rule you can test

Weak ruleTestable version
Use our brand blue for buttonsPrimary buttons use #1D4ED8 with white text, corner radius 8 px, 48 px high
Keep spacing generousSections are separated by 64 px on desktop and 48 px on mobile, from the spacing scale
Use readable textBody text is 16 px or larger, line height 1.5, dark grey #333333 on white
Photos should feel warmPhotos are our own, shot in daylight, cropped to 4 by 3, delivered as WebP under 150 KB
Be friendly in toneWrite as you would speak to a customer: short sentences, no jargon. Example: "We will call you back within one working day."

The test of any rule is that two people looking at the same page would give the same answer.

Where to keep it

FormatGood forWatch out for
A page on the site (not linked from the menu)Teams that edit the live site; examples are the real componentsNeeds a no-index tag so it does not compete in search
A Figma fileDesign teamsThe code can drift away from it
A PDFHanding to a printer or a one-off freelancerIt goes out of date the day it is saved
A shared documentContent rules and voiceHard to show components

Webflow's post suggests treating it as a living document, and notes that it speeds up revisions and keeps a team consistent. Whichever format you choose, give it an owner and a date of last review.

Who reads it, and when to update it

  • Designers use it to stay within the system when a new page is needed.
  • Developers use it to build components once and reuse them.
  • Editors use the content rules every time they publish.
  • Update it when you add a component, change a colour, or fix an accessibility issue. If a page needs something the guide does not allow, decide whether the guide or the page is wrong, and change one of them.

A checklist before you call it done

  1. Every colour has a role and a hex code.
  2. Every text and background pair has a contrast figure next to it.
  3. Type styles are named, with desktop and mobile sizes.
  4. There is a spacing scale and a maximum content width.
  5. Each component shows default, hover, focus and error or disabled states.
  6. Image and icon rules are written down.
  7. Content rules cover headings, buttons, links and tone.
  8. Someone owns it and the last review date is on the page.

How Amariq can help

For a site we would write the style guide as part of the design, so the colour roles, type scale, spacing and component states are agreed before the build and checked against it afterwards. The price comes from scope and is never hourly, paid in three steps: a 40% start payment, 30% when the design is approved and 30% before launch. Ownership is simple: after the final payment you hold the design, the copy and the code, and the domain, hosting and analytics logins are in your own name from the start. Details are on the web design service page, or book a call to talk it through.

Frequently asked questions

What is a website style guide?

A document of rules for how the pages of a website look and read: colours, type, spacing, components, images and writing. Webflow describes it as setting rules for colour, typography and UI components to keep visual and content consistency.

What should a website style guide include?

Colour roles with hex codes and contrast figures, a named type scale, a spacing scale and grid, components with their states, image and icon rules, content rules and accessibility minimums.

Is a style guide the same as a brand guide?

No. A brand guide covers the whole brand in print and on screen. A website style guide applies it to web pages, with the detail a developer and an editor need. Webflow calls it a component of the larger branding guide.

How long should it be?

As short as will still settle the questions your team keeps asking. A page of rules and a page of examples is enough for most small sites.

Do brand colours have to meet contrast rules?

For text on a web page, yes. The W3C says that beyond logos and logotypes, low contrast caused by corporate identity or brand guidelines is not exempt. If a brand colour fails, add a darker variant for text and buttons.

Do I need a design system instead?

Not for a small site. A design system adds coded components and a process for changing them, which pays off when several people ship work. Start with the style guide.

How often should it be updated?

Whenever the site changes in a way the guide should capture, and reviewed on a fixed date such as twice a year.

Rahat Khondokar, founder of Amariq

Rahat Khondokar

Founder & CEO, Amariq

Rahat designs and builds websites for marketing teams and ecommerce brands, and writes here about the structure, copy and conversion work behind them. More about Amariq. Find him on YouTube, Dribbble and LinkedIn.

Keep reading

Related articles.

All articles

Portfolio Page Design: What Clients Look For, and Where the Advice Disagrees
Web Design·24 November 2026

Portfolio Page Design: What Clients Look For

Portfolio page design for a studio or service business: how many projects, what each card says, how to filter, and where advice disagrees. Checked 24 Nov 2026.