HTML Entities & Special Characters

What is  ?

  is the HTML entity for a non-breaking space — a space character that prevents the browser from inserting a line break at that position. It looks identical to a normal space but keeps the words on either side together on the same line no matter how narrow the viewport gets.

Common uses: keeping a number and its unit together (10 km), preventing a name from wrapping (Mr. Smith), or adding visual padding in table cells. The named entity is   and the numeric equivalent is  .

When not to use   for spacing: if you want layout or whitespace for design purposes, use CSS (padding, margin, or gap) instead. Using many consecutive   entities to indent or align content is a sign that CSS should be doing that work.

How to add a space in HTML

There are several ways to add space in HTML, each with a different purpose:

When to use HTML entities

Named vs. numeric entities

Named entities like © are easier to read and remember. Numeric entities express the Unicode code point in decimal (©) or hexadecimal (©). All three produce the same output: ©. Named entities are supported by all browsers for standard HTML symbols — the full list is defined by the WHATWG HTML Standard's named character references table; numeric entities work for any Unicode character reference.

Do you still need entities in UTF-8 documents?

If your HTML file is saved as UTF-8 (the default for modern web pages), most special characters can be typed or pasted directly. You only need to escape the five reserved HTML characters (< > & " '). Entities remain useful in template systems and anywhere HTML strings are built programmatically from plain ASCII.

Frequently asked questions

What does &nbsp; mean?

&nbsp; stands for non-breaking space. It inserts a space character (Unicode U+00A0) that the browser treats differently from a regular space — it will not collapse multiple instances and the browser will not wrap a line at that space. It is the most commonly looked-up HTML entity.

What is &amp; in HTML?

&amp; is the HTML entity for the ampersand character &. Because & is the start character for all HTML entities, any literal ampersand in HTML content must be written as &amp; to avoid being misinterpreted as the start of an entity sequence.

How do I write the copyright symbol in HTML?

Use &copy; or the numeric equivalent &#169;. Both render as ©. In a UTF-8 document you can also paste the © character directly — modern browsers handle it correctly either way.

What is the difference between &nbsp; and a regular space?

A regular space is a word-break opportunity — the browser may wrap a line there. &nbsp; is a non-breaking space — the browser keeps the words joined across that space no matter how narrow the container is. A regular space also collapses (multiple spaces become one); &nbsp; does not collapse.