--- id: html-entities title: "HTML Entities" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["character entities", "reserved characters", "non-breaking space", "nbsp", "entity name", "entity number", "diacritical marks"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.90 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["html", "web", "frontend", "w3schools", "entities", "characters"] raw_sources: ["https://www.w3schools.com/html/html_entities.asp"] applied_in: [] github_commit: "" --- # [[HTML Entities]] ## ๐ŸŽฏ ํ•œ ์ค„ ํ†ต์ฐฐ (One-line insight) Reserved characters in HTML must be replaced with entities โ€” written as an entity name (`&name;`) or an entity number (`&#number;`) โ€” so the browser does not confuse them with tags. [S1] ## ๐Ÿง  ํ•ต์‹ฌ ๊ฐœ๋… (Core concepts) - **Reserved characters need entities** โ€” characters like `<` and `>` are reserved; if used directly in text, the browser might mix them up with tags. [S1] - **Two entity forms** โ€” entity names (`&entity_name;`) or entity numbers (`&#entity_number;`) can both display reserved characters. [S1] - **Names are easier** โ€” entity names are easier to remember than entity numbers. [S1] - **Names are case sensitive** โ€” entity names must use the correct case. [S1] - **Non-breaking space (` `)** โ€” a space that will not break into a new line and prevents the browser from truncating consecutive spaces. [S1] - **Combining diacritical marks** โ€” marks can combine with alphanumeric characters to produce characters not present in the page's encoding. [S1] ## ๐Ÿงฉ ์ถ”์ถœ๋œ ํŒจํ„ด (Extracted patterns) - **Less-than** โ€” `<` or `<` displays `<`. [S1] - **Greater-than** โ€” `>` or `>` displays `>`. [S1] - **Ampersand** โ€” `&` displays `&`. [S1] - **Non-breaking space** โ€” ` ` keeps two words on the same line (e.g. `10 km/h`, `10 PM`) and adds real spaces. [S1] - **Combining mark** โ€” base char + mark number, e.g. `à` โ†’ `ร `. [S1] ## ๐Ÿ“– ์„ธ๋ถ€ ๋‚ด์šฉ (Details) **Reserved characters** Some characters are reserved in HTML. If you use the less-than (`<`) or greater-than (`>`) signs in your HTML text, the browser might mix them with tags. Entity names or entity numbers can be used to display reserved HTML characters. [S1] - `<` (less than) = `<` - `>` (greater than) = `>` **Entity syntax** An entity is written either as a name or as a number: [S1] ```text &entity_name; &#entity_number; ``` For example, to display a less-than sign (`<`) we must write `<` or `<`. Entity names are easier to remember than entity numbers. [S1] > Note: Entity names are case sensitive. [S1] **Non-breaking space** A commonly used HTML entity is the non-breaking space: ` `. A non-breaking space is a space that will not break into a new line. Two words separated by a non-breaking space will stick together (not break into a new line). This is handy when breaking the words might be disruptive, for example: [S1] - `ยง 10` - `10 km/h` - `10 PM` Another common use of the non-breaking space is to prevent browsers from truncating spaces in HTML pages. If you write 10 spaces in your text, the browser will remove 9 of them; to add real spaces to your text, you can use the ` ` character entity. The non-breaking hyphen (`‑`) is used to define a hyphen character (`โ€‘`) that does not break into a new line. [S1] **Some useful HTML character entities** | Result | Description | Name | Number | |---|---|---|---| | (space) | non-breaking space | ` ` | ` ` | | < | less than | `<` | `<` | | > | greater than | `>` | `>` | | & | ampersand | `&` | `&` | | " | double quotation mark | `"` | `"` | | ' | single quotation mark | `'` | `'` | | ยข | cent | `¢` | `¢` | | ยฃ | pound | `£` | `£` | | ยฅ | yen | `¥` | `¥` | | โ‚ฌ | euro | `€` | `€` | | ยฉ | copyright | `©` | `©` | | ยฎ | registered trademark | `®` | `®` | | โ„ข | trademark | `™` | `™` | [S1] **Combining diacritical marks** A diacritical mark is a "glyph" added to a letter. Some diacritical marks, like grave ( ฬ€) and acute ( ฬ), are called accents. Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set (encoding) used in the page. [S1] | Mark | Character | Construct | Result | |---|---|---|---| | ฬ€ | a | `à` | ร  | | ฬ | a | `á` | รก | | ฬ‚ | a | `â` | รข | | ฬƒ | a | `ã` | รฃ | | ฬ€ | O | `Ò` | ร’ | | ฬ | O | `Ó` | ร“ | | ฬ‚ | O | `Ô` | ร” | | ฬƒ | O | `Õ` | ร• | [S1] ## ๐Ÿ› ๏ธ ์ ์šฉ ์‚ฌ๋ก€ (Applied in summary) The reserved-character substitutions (`<`, `>`, `&`), the ` ` usage examples (`10 km/h`, `10 PM`, preserving spaces), and the combining-mark constructs (`à` โ†’ ร ) are the canonical applied examples. No external project/commit applications found in the source. ## ๐Ÿ’ป ์ฝ”๋“œ ํŒจํ„ด (Code patterns) Display a literal less-than sign: ```html < < ``` Keep two words on the same line: ```html 10 km/h ``` Combine a base character with a diacritical mark: ```html à ``` ## โš–๏ธ ๋น„๊ต ๋ฐ ์„ ํƒ ๊ธฐ์ค€ (Comparison & decision criteria) - **Entity name (`<`)** โ€” easier to remember; case sensitive. [S1] - **Entity number (`<`)** โ€” numeric alternative producing the same character. [S1] ## โš–๏ธ ๋ชจ์ˆœ ๋ฐ ์—…๋ฐ์ดํŠธ (Contradictions & updates) No contradictions found in the source. ## โœ… ๊ฒ€์ฆ ์ƒํƒœ ๋ฐ ์‹ ๋ขฐ๋„ - **์ƒํƒœ:** draft - **๊ฒ€์ฆ ๋‹จ๊ณ„:** conceptual (์‹ค์ œ ์ ์šฉ ์‚ฌ๋ก€ ๋ฐœ๊ฒฌ ์‹œ applied/validated๋กœ ์Šน๊ฒฉ ๊ฐ€๋Šฅ) - **์ถœ์ฒ˜ ์‹ ๋ขฐ๋„:** B (W3Schools โ€” widely used educational reference, not a primary standards body) - **์‹ ๋ขฐ ์ ์ˆ˜:** 0.90 - **์ค‘๋ณต ๊ฒ€์‚ฌ ๊ฒฐ๊ณผ:** ์‹ ๊ทœ ์ƒ์„ฑ (New discovery) ## ๐Ÿ”— ์ง€์‹ ๊ทธ๋ž˜ํ”„ (Knowledge Graph) - **์ƒ์œ„/๋ฃจํŠธ:** [[HTML Tutorial]] - **๊ด€๋ จ ๊ฐœ๋…:** [[HTML Symbols]], [[HTML Charset]], [[HTML Formatting]], [[HTML Introduction]] - **์ฐธ์กฐ ๋งฅ๋ฝ:** Referenced whenever reserved characters, special symbols, real spaces, or accented characters must be displayed safely in HTML text. ## ๐Ÿ“š ์ถœ์ฒ˜ (Sources) - [S1] W3Schools โ€” HTML Entities โ€” https://www.w3schools.com/html/html_entities.asp ## ๐Ÿ“ ๋ณ€๊ฒฝ ์ด๋ ฅ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "HTML Entities" page (Astra wiki-curation, P-Reinforce v3.1 format).