--- title: Entity (エンティティ) slug: Glossary/Entity tags: - CodingScripting - Composing - Glossary - HTML translation_of: Glossary/Entity --- <p><span class="seoSummary">{{glossary("HTML")}} <strong>エンティティ</strong>とは、アンパサンド (<code>&</code>) で始まりセミコロン (<code>;</code>)で終わるテキスト (文字列) のひと固まりです。エンティティは(通常は HTML コードとして解釈される)予約済み文字や、(ノーブレークスペースのように) 見えない文字を表示するためによく使用されます。標準キーボードでは入力が難しい文字の代わりに使用することもできます。</span></p> <div class="note"> <p>多くの文字は覚えやすいエンティティです。例えば、コピーライト記号 (<code>©</code>) のエンティティは <code>&copy;</code> です。覚えにくものとしては、<code>&#8212;</code> や <code>&#x2014;</code> があります。<a href="https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references">リファレンス表</a>や<a href="https://mothereff.in/html-entities">デコーダーツール</a>を使用してみてください。</p> </div> <h2 id="Reserved_characters" name="Reserved_characters">予約済み文字</h2> <p>HTML で使用されるために予約されている特別な文字があり、ブラウザーはそれら予約済み文字を HTML コードとしてパースします。例えば、小なり (<code><</code>) 記号を使用すると、ブラウザーは文章を{{Glossary('Tag','タグ')}}として解釈します。</p> <p>これらの文字をテキストとして表示するためには、以下のテーブルで示されている、対応する文字エンティティに置き換えてください。</p> <table class="standard-table"> <thead> <tr> <th scope="col">文字</th> <th scope="col">エンティティ</th> <th scope="col">注記</th> </tr> </thead> <tbody> <tr> <td>&</td> <td><code>&amp;</code></td> <td>エンティティや文字参照の開始として解釈されます。</td> </tr> <tr> <td><</td> <td><code>&lt;</code></td> <td>{{Glossary('Tag','タグ')}}の開始として解釈されます。</td> </tr> <tr> <td>></td> <td><code>&gt;</code></td> <td>{{Glossary('Tag','タグ')}}の終了として解釈されます。</td> </tr> <tr> <td>"</td> <td><code>&quot;</code></td> <td>{{Glossary('Attribute','属性')}}の値の開始や終了として解釈されます。</td> </tr> </tbody> </table> <h2 id="Learn_more" name="Learn_more">関連情報</h2> <h3 id="Technical_reference" name="Technical_reference">技術リファレンス</h3> <ul> <li><a href="https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references">文字エンティティの公式リスト</a></li> </ul>