レッスン 2

Named vs Numeric Entities 日本語ガイド

日本語の html entity named vs numeric entities ガイド: Compare named, decimal, and hex entity forms.

このコンテンツはまだ日本語で用意されていません。ローカライズが完了するまで English 版を表示しています。

The same character can often be written in multiple entity forms. For copyright ©:

  • Named: ©
  • Decimal: ©
  • Hexadecimal: ©

After decoding, all three produce the same Unicode character.

Readability vs coverage

Named entities are easier to read in templates and CMS fields. Editors recognize   and < quickly.

Numeric entities work for any Unicode code point, including characters without a standard named alias. They are essential for rare symbols, emoji-adjacent punctuation, or legacy encodings.

Round-trip behavior

When you encode text and decode it again, the bytes of the original text should match if you use consistent rules. However, the entity string may differ:

  • © encoded as © vs © vs ©
  • A space vs   (non-breaking space is a different character from a normal space)

Always check whether your workflow cares about character equality or exact entity string equality.

Legacy forms without semicolons

Some older HTML content uses &copy without a trailing semicolon. Modern parsers and strict decoders may treat this differently. Prefer the semicolon form in new content.

Choosing a style

GoalSuggested style
Human-readable templatesNamed where available
Full Unicode coverageDecimal or hex
Compact logsHex (often shorter for large code points)
CMS compatibilityMatch the platform's default exporter

実践したいときは関連する DevCove ツールを使えます。任意であり、このレッスンの必須部分ではありません。

関連ツールを開く

コース概要へ戻る