> Markdown version of [/magazine/589-spot-the-mistakes-css](https://www.wearedevelopers.com/magazine/589-spot-the-mistakes-css). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Spot the Mistakes: CSS **By:** [Daniel Cranney](https://www.wearedevelopers.com/@daniel-cranney) **Published:** May 21, 2025 Our community has had a great time solving our _spot the mistakes_ challenges, so we thought we’d keep it rolling with another one. This time, we’ll be setting our sights on CSS. See if you can spot the **6 mistakes** in our code. **Let us know on socials if you spot them, or check out the answers at the end of the article.** ## The Code body { font-family: "Helvetica Neue", sans serif; background-colour: #f9f9f9; margin 0; } h1 { color: lightnavy; margin-top: 1em; } p { line-height: 150%; max-width: 600px font-size: 1.1rem; text-align: justified; } a { text-decoration: none; color: #00f; hover-color: red; } ## The Answers Think you’ve found the answers? See if you found them all below. Mistake 1 **Incorrect font family keyword** The value `sans serif` is invalid—CSS requires a hyphen: `sans-serif`. Mistake 2 **Incorrect property name** `background-colour` is not valid CSS. The correct property is spelled `background-color`. Mistake 3 **Missing colon in property** The line `margin 0;` is missing a colon and should be `margin: 0;`. Mistake 4 **Nonexistent CSS color name** `lightnavy` might sound real, but it’s not a valid CSS color. Use something like `lightblue` or `#336699` instead. Mistake 5 **Missing semicolon after property** In the `p` selector, there's no semicolon after `max-width: 600px`. This breaks the next line `font-size` from being parsed correctly. Mistake 6 **Invalid hover property syntax** `hover-color` is not a real CSS property. To change color on hover, use a pseudo-class: `a:hover { color: red; }` ## Related Articles - [Spot the Mistakes: A Paragraph with Problems](https://www.wearedevelopers.com/magazine/574-spot-the-mistakes-a-paragraph-with-problems) - [Spot the Mistakes: HTML Forms](https://www.wearedevelopers.com/magazine/577-spot-the-mistakes-html-forms) - [Spot the Mistakes: HTML Tables](https://www.wearedevelopers.com/magazine/583-spot-the-mistakes-html-tables) - [Find all accessibility problems in a page to take part in the CODE100 final!](https://www.wearedevelopers.com/magazine/507-find-all-accessibility-problems-in-a-page-to-take-part-in-the-code100-final) ## Related Videos - [Tips and Tricks: CSS Pseudo Class Selectors and Pseudo Elements](https://www.wearedevelopers.com/videos/1247-tips-and-tricks-css-pseudo-class-selectors-and-pseudo-elements) - [Going on a CODE100 Accessibility Scavenger Hunt](https://www.wearedevelopers.com/videos/1252-going-on-a-code100-accessibility-scavenger-hunt) - [WeAreDevelopers LIVE - CSS or BS?](https://www.wearedevelopers.com/videos/1850-wearedevelopers-live-css-or-bs) - [WeAreDevelopers LIVE - CSS is DOOMed](https://www.wearedevelopers.com/videos/1838-wearedevelopers-live-css-is-doomed) ## Related Jobs - [Remote Senior Full-Stack Engineer](https://www.wearedevelopers.com/jobs/ext/679408-remote-senior-full-stack-engineer) at **Edge Impulse** - [Remote Senior Full-Stack Engineer](https://www.wearedevelopers.com/jobs/ext/639235-remote-senior-full-stack-engineer) at **Edge Impulse** - [Remote Senior Full-Stack Engineer](https://www.wearedevelopers.com/jobs/ext/683045-remote-senior-full-stack-engineer) at **Edge Impulse** - [Remote Senior Full-Stack Engineer](https://www.wearedevelopers.com/jobs/ext/356601-remote-senior-full-stack-engineer) at **Edge Impulse** - [Remote Senior Full-Stack Engineer](https://www.wearedevelopers.com/jobs/ext/646086-remote-senior-full-stack-engineer) at **Edge Impulse** - [Remote Senior Full-Stack Engineer](https://www.wearedevelopers.com/jobs/ext/645320-remote-senior-full-stack-engineer) at **Edge Impulse**