Current location - Quotes Website - Signature design - What are the differences between tags, elements, and attributes in HTML language?
What are the differences between tags, elements, and attributes in HTML language?

1. Elements:?

HTML web pages are actually text files composed of many various HTML elements, and any web browser can directly run HTML document. So it can be said that HTML elements are the basic objects that constitute HTML files, and HTML elements can be said to be a general term. HTML elements are defined using HTML tags.

2. Tags:?

Tags are objects enclosed by angle brackets "<" and ">" such as , , and

. Most of them Some

tags appear in pairs, such as

, . Of course, there are a few

that do not appear in pairs, such as
,


, etc.

The tag is used to mark HTML elements. The text between the start tag and the end tag is the content of the HTML element.

3. Attributes:?

HTML attributes provide various additional information for HTML elements, which are always in the form of name-value pairs such as "attribute name = attribute value" appears, and attributes are always defined in the opening tag of an HTML element.

?

Title ?

?

hhhhhhhhhh
?

?

In this example,

this is The example page
is an HTML element, where "hhhhhhhhhh" is the specific content of the element. <body> and so on are HTML tags, which constitute HTML elements. The bgcolor=#f00" in <body bgcolor="#f00"> is the attribute of the tag, which defines how the tag should be configured specifically.</p><p>In short, you don’t need to pay too much attention to the difference between elements and tags. In fact, At work, we all refer to tags directly, and attributes are easy to understand. It is to add various additional information or configuration options to HTML tags. For example, HTML is a family, and each HTML tag is a member of this family. , they each have their own tasks, such as div, p, etc.;</p><p>Each member has their own characteristics, and the name of this characteristic (for example: height, weight, hobbies, etc.) is similar to HTML attributes width, height, border, etc.; the specific values ??of these characteristics (for example: 180cm, 50kg, reading, etc.) are similar to the HTML attribute values ??100px, 10px, solid #f00.</p></div> </div> <div class="module mod-visit"> <div class="hd">Related articles</div> <div class="bd"> <li><a href="/Signaturedesign/sywjgolxrp.html">My uncle is getting further and further on his funny road. Wang Yaoqing wishes birthday. How does he send blessings to himself?</a></li> <li><a href="/Signaturedesign/zpgsgtnvty.html">How does Pinduoduo evaluate products?</a></li> <li><a href="/Signaturedesign/tufhmmgojb.html">I like a girl named Chen Yuwei. Please help me design a qq name and personal signature about her. Thank you!</a></li> <li><a href="/Signaturedesign/vpladvexze.html">How can I buy Song Xuanya's signature?</a></li> <li><a href="/Signaturedesign/pakjnpagru.html">Where is the signature design? Name: Wang Huachao.</a></li> <li><a href="/Signaturedesign/omotyrnlbn.html">Forget it. Forget it. What songs are there?</a></li> <li><a href="/Signaturedesign/nhsohgopnb.html">Concentrated implementation plan for safety production disaster prevention and reduction activities</a></li> <li><a href="/Signaturedesign/nqmmxvkhlo.html">What is the maximum amount of YOUNG Youth card of China Merchants Bank?</a></li> <li><a href="/Signaturedesign/qzlddnsiqx.html">Resent or not, life remains the same; worry or not worry, life remains the same</a></li> <li><a href="/Signaturedesign/qnrcnoidap.html">Company profile of Beijing Dianju Information Technology Co., Ltd.</a></li> </div> </div> </div> </div> <div class="footer"> <div class="mod-foot"> <div class="inner"> <div class="bd"> <p><span>copyright 2024 <a href="https://www.ysznh.com"><b>Quotes Website</b></a> All rights reserved <script type="text/javascript" src="/style/tongji.js"></script></span></p> </div> </div> </div> </div> </div> </body> </html>