# Component Markup Rules

Two rules for a component's markup: return one root element (or a fragment, &lt;>…&lt;/>), and close every element, even &lt;hr />.

![Cheat sheet: Component Markup Rules](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/33298f109612462683c26bedebc5ffa9.webp)

- Category: React
- Level: Apprentice
- Tags: react
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/react-components-component-markup-rules-cheat-sheet
