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

What are the components of elements in html5

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of the components of the elements in html5, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will gain something after reading the components of the elements in this html5, let's take a look at it.

The element in html5 consists of opening and ending tags, content and attributes, and the syntax "content". Tag names are not case-sensitive, but the values of attributes need to be case-sensitive; and a small number of HTML tags do not have separate closing tags, but instead add "/" to the opening tag to close.

The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.

Tags in HTML are like keywords, each with its own semantics (meaning), such as

The tag represents the paragraph, and the tag represents bold. Depending on the tag, browsers display the contents of the tag in different ways.

In actual development, we sometimes refer to HTML tags as HTML elements.

The element in html5 consists of three parts: beginning and ending tags, content and attributes.

Most html elements start with the opening tag and end with the closing tag, while a few HTML elements do not have a separate closing tag and are closed with "/".

The content of the element is the content between the start tag and the end tag.

The name of the label is not case-sensitive, but the values of most attributes need to be case-sensitive, as follows:

Attribute ↓ ↑ start tag content end tag

In addition to the class attribute, the opening tag can also contain other attribute information, such as id, title, and so on.

Note that although HTML tags are syntactically case-insensitive, for the sake of specification and professionalism, it is strongly recommended that all tags be defined in lowercase.

When we use a browser to open the HTML document we wrote, the browser reads the contents of the document from top to bottom and renders the contents of the tags in the browser based on HTML tags and attributes.

An HTML document must have some basic tags so that browsers can distinguish between plain text and HTML documents. You can use any number of tags depending on the effect you want to achieve, but there are a few points to note:

All HTML tags must be placed in angle brackets

< >

Inside

Different tags in HTML can achieve different effects.

If a tag is used, it must end with the corresponding closing tag (except for autistic and tags).

Autism and tagging

There are some HTML tags that do not have a separate closing tag, but instead add / to the opening tag to close. These tags are called autism and tags. Take a look at the following example:

C语言中文网Logo

Autism and tags do not surround the content, so there is no need for a separate closing tag. Only a small number of HTML tags are self-closing and sum.

Represents the HTML comment, which is used to describe the HTML code. The browser ignores the comment content, so the user cannot see the comment in the web page.

This is the end of the article on "what are the components of the elements in html5?" Thank you for reading! I believe you all have a certain understanding of "what are the components of the elements in html5". If you want to learn more, you are welcome to follow the industry information channel.

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