aboutsummaryrefslogtreecommitdiff
path: root/files/fa/glossary/element/index.html
blob: ac3e104ed2ef83097e4da511d582c9208e251bec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
title: Element
slug: Glossary/Element
translation_of: Glossary/Element
---
<p dir="rtl">هر اِلِمِنت(<strong>element</strong>) بخشی از یک صفحه‌ی وب است. در <a class="glossaryLink" href="/en-US/docs/Glossary/XML" title="XML: eXtensible Markup Language (XML) is a generic markup language specified by the W3C. The information technology (IT) industry uses many languages based on XML as data-description languages.">XML</a> و <a class="glossaryLink" href="/en-US/docs/Glossary/HTML" title="HTML: HTML (HyperText Markup Language) is a descriptive language that specifies webpage structure.">HTML</a> هر المنت می‌تواند حاوی نوعی data، یا چند خط متن، یا یک تصویر، یا حتی خالی باشد. یک المنت در حالت عادی با یک تگ آغازین(opening tag) و چند صفت(<a class="glossaryLink" href="/en-US/docs/Glossary/attribute" title="attributes: An attribute extends a tag, changing its behavior or providing metadata.">attribute</a>) شروع می‌شود، متنی را در خود جای داده و سپس با تگ پایانی بسته(closing tag) می‌شود.</p>

<p dir="rtl"><img alt="مثال: در &lt;p class=&quot;nice&quot;>Hello world!&lt;/p>، '&lt;p class=&quot;nice&quot;>' همان تگ آغازین می‌باشد. 'class=&quot;nice&quot;' یک صفت به همراه مقدار مخصوص به خود است. 'Hello world!' محتوای متنی این المنت است که داخل تگ آغازین و پایانی محصور شده. '&lt;/p>' تگ پایانی می‌باشد." src="https://media.prod.mdn.mozit.cloud/attachments/2020/08/29/17378/9f32289c970c81ca84ca4104b9a3e258/anatomy-of-an-html-element-fa.png" style="height: 181px; width: 609px;"></p>

<p dir="rtl">المنت و تگ(<a class="glossaryLink" href="/en-US/docs/Glossary/tag" title="tags: In HTML a tag is used for creating an element.  The name of an HTML element is the name used in angle brackets such as &lt;p> for paragraph.  Note that the end tag's name is preceded by a slash character, &quot;&lt;/p>&quot;, and that in empty elements the end tag is neither required nor allowed. If attributes are not mentioned, default values are used in each case.">tag</a>) به دو مفهوم مجزا اشاره می‌کنند و کاملاً با هم متفاوتند. تگ‌ها، شروع و پایان هر المنت را نشان می‌دهند، در حالی که هر المنت بخشی از <a class="glossaryLink" href="/en-US/docs/Glossary/DOM" title="DOM: The DOM (Document Object Model) is an API that represents and interacts with any HTML or XML document. The DOM is a document model loaded in the browser and representing the document as a node tree, where each node represents part of the document (e.g. an element, text string, or comment).">DOM</a> (مجموعه‌ای از تمام المنت‌ها که <a class="glossaryLink" href="/en-US/docs/Glossary/browser" title="browser: A Web browser or browser is a program that retrieves and displays pages from the Web, and lets users access further pages through hyperlinks. A browser is the most familiar type of user agent.">browser</a>ها برای نمایش سایت از آن استفاده می‌کنند) می‌باشد.</p>

<h2 dir="rtl" id="مطالب_مرتبط">مطالب مرتبط</h2>

<ul dir="rtl">
 <li><a href="/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started">شروع کار با HTML</a></li>
 <li><a href="/en-US/docs/Web/Web_Components/Using_custom_elements">تعریف المنت دلخواه</a></li>
 <li>کلاس المنت({{domxref("Element")}})، نماینده‌ی المنت‌های داخل DOM.</li>
</ul>