--- title: Element (要素) slug: Glossary/Element tags: - CodingScripting - Glossary - HTML translation_of: Glossary/Element --- <p><strong>要素</strong> (element) はウェブページの一部分です。{{Glossary("XML")}} と {{Glossary("HTML")}} では、要素はデータ項目やテキストのかたまりや画像を含んだり、何も含まなかったりします。ふつうは要素は {{Glossary("attribute", "属性")}} (attributes) つきの開始タグ (an opening tag) と、囲まれたテキストコンテンツと、閉じタグ (a closing tag) を含んでいます。</p> <p><img alt="Example: in <p class="nice">Hello world!</p>, '<p class="nice">' is an opening tag, 'class="nice"' is an attribute and its value, 'Hello world!' is enclosed text content, and '</p>' is a closing tag." src="https://mdn.mozillademos.org/files/7659/anatomy-of-an-html-element.png" style="height: 181px; width: 609px;"></p> <p>要素と{{glossary("tag", "タグ")}}は同じでは<em>ありません</em>。タグはソースコード内で要素を開始させたり終了させたりするのに対し、要素は {{Glossary("DOM")}} 、つまり{{Glossary("browser", "ブラウザー")}}に表示するドキュメントモデルの一部分です。</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li><a href="/ja/docs/Learn/HTML/Introduction_to_HTML/Getting_started">要素についての詳細</a></li> <li><a href="/ja/docs/Web/Web_Components/Using_custom_elements">Web_Components/Custom_Elements</a></li> <li>DOM の中で要素を表現する{{domxref("Element")}} インターフェイス</li> </ul>