Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

HTML tag and element example Analysis

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "HTML tags and element case analysis", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "HTML tags and element case analysis" bar!

What is a label?

These are the labels above.

< head>

< body>

< table>

For objects such as those wrapped in angle brackets, most of the tags appear in pairs, such as

< table>

< /talbe>

< form>

< /form>

. The first tag in the tag pair is the start tag, and the second tag is the end tag. The start and end tags are also known as open tags and closed tags; of course, there are a few that do not appear in pairs, such as

< br>

< hr>

Wait. Tags are used to mark up HTML elements. The text between the start and end tags is the content of the HTML element.

Introduce what elements are in advance (comparison)

Many people may not have a clear idea of which is called label and which is called element, and they are always confused when they learn it. In order to prevent such a tragedy from happening again, I will make a distinction here in advance. In fact, the concept between the two is very clear.

A HTML web page is actually a text file made up of a wide variety of HTML elements, and any web browser can run HTML files directly. So it can be said that the HTML element is the basic object that constitutes the HTML file, and the HTML element can be said to be a general term. The HTML element is defined by using the HTML tag.

such as

< p>

This is a label.

< p>

Content

< /p>

This is an element, that is, an element consists of an opening tag and an closing tag to contain something; there is a noteworthy exception, that is,

< br/>

It is both a start tag and an end tag, but it doesn't contain anything, so it's just a tag.

Commonly used label

We know that web pages can achieve a variety of customization, achieve a variety of functions, which in turn can show that we have many kinds of tags, so that we can achieve a variety of functions and definitions. And here we first talk about the four most basic labels.

The HTML title Heading is passed through the

< h2>

-

< h7>

And other tags to define. Example:

This is first heading

This is second heading

This is third heading

...

...

The HTML paragraph paragraph is done through

< p>

Tag to define. Example:

This is a paragraph.

This is another paragraph.

...

...

HTML links are linked through the

< a>

Tag to define. Example:

This is a link

The HTML image image is defined by tags. Example:

Here is a simple presentation of four commonly used tags. One more thing to add here is that HTML tags are not case-sensitive:

< P>

Equivalent to

< p>

. Many websites use uppercase HTML tags.

Thank you for your reading, the above is the content of "HTML tag and element instance analysis". After the study of this article, I believe you have a deeper understanding of the problem of HTML tag and element instance analysis, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report