# How to prevent line breaks inside HTML code elements

A CSS tip explains how to stop text inside HTML <code> elements from breaking across lines, maintaining code readability. Developers can use properties like `white-space: nowrap` or `pre-wrap` to control wrapping. This helps ensure code snippets display as intended on web pages.

**Importance:** 2/5

## Sources

### Technology
- [Hacker News](https://alexwlchan.net/2026/non-breaking-code/) — Fri, 24 Jul 2026 14:20:17 +0000