Home  >  Article  >  Web Front-end  >  Discussion on some issues about HTML body

Discussion on some issues about HTML body

零到壹度
零到壹度Original
2018-03-29 13:10:351381browse


This article mainly shares with you a discussion on some issues about the HTML body. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to have a look.

HTML body

6c04bd5ca3fcae76e30b72ad730ca86d tag is used to define the body content of the document and appears in pairs. The content between 6c04bd5ca3fcae76e30b72ad730ca86d... 36cc49f0c466276486e50c850b7e4956 is the main content of the page, which can be text, images, audio, video, forms and other interactive content. They are what are actually displayed in the browser. Display and allow visitors to see the content.

Because HTML elements can be nested within each other, an ever-changing web page is formed by nesting elements layer by layer. When an element contains another element, the outer element is called the parent element and the inner element is called the child element. Child elements can also contain child elements. Any elements contained in child elements are descendants of the outer parent element. For example:

<article>
    <h1></h1>
    <h2></h2>
    <p><em></em><a></a></p>
</article>

In the above code, the article element is the parent element of the h1, h2, and p elements, and the h1, h2, and p elements are the child elements (also descendants) of the article element. The p element is the parent element of the em and a elements. The em and a elements are child elements of the p element and are descendants (but not child elements) of the article element. The article element is the ancestor of the em and a elements.

It should be noted that when an element contains other elements, each element must be nested correctly. The start tag and end tag pairs of these elements are not allowed to cross each other. For example:

<p><a></p></a>

If you start p first, and then start a, you must end a first, and then end p. In the above code, there is an intersection between the tag pairs of the a element and the p element, which is incorrect nesting.

Related recommendations:

Commonly used settings for the HTML body

The basic tags of HTML files 6c04bd5ca3fcae76e30b72ad730ca86d The main body tag of the page

##The main structure of HTML                                                                                        

The above is the detailed content of Discussion on some issues about HTML body. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn