清除元素中的子元素html_HTML中的元素简介
清除元素中的子元素html
An element is a fundamental component that is used to develop web pages. Generally an element as two components: a starting tag and a closing tag. The content is added in between the starting and closing tags. The ending tag is the same as the starting the staring tag except that the ending tag precedes with a "/".
元素是用于開發網頁的基本組件。 通常, 元素由兩個部分組成: 開始標簽和結束標簽 。 內容添加在開始標記和結束標記之間。 結束標簽與起始凝視標簽相同,除了結束標簽以“ /”開頭。
Syntax:
句法:
<h1 align="right"> A HEADING </h1>Here,
這里,
H1: tag name, starting tag
H1 :標簽名稱,起始標簽
align="right": name and value. It is an attribute
align =“ right” :名稱和值。 這是一個屬性
A HEADING: Content
標題 :內容
/H1: end tag
/ H1 :結束標簽
HTML元素的類型 (Types of the HTML elements)
The elements in the HTML are classified in two types,
HTML中的元素分為兩種類型,
1) Container Elements
1)容器元素
These elements have a starting and an ending tag. The content is given in between the tags.
這些元素具有開始和結束標記。 內容在標簽之間給出。
Example:
例:
<b>this element is used for bold text</b>2) Empty Elements
2)空元素
These elements do not contain an ending tag. They have a starting tag only. These elements are used for performing some specific functions.
這些元素不包含結束標記。 它們僅具有開始標記。 這些元素用于執行某些特定功能。
Exampple:
范例:
This element is used to give a horizontal rule or say line.<hr />The HTML elements can also be used in a nested form.
HTML元素也可以嵌套形式使用。
<b> <i> to give BOLD and ITALICS letters </i> </b>With the nested elements one should careful with the closing tags. That means the inner tags should be closed first then the outer tags. Like in the above example, the <i> tag closed before the <b> tag.
對于嵌套元素,應該注意結束標記。 這意味著應該先關閉內部標簽,然后再關閉外部標簽。 像上面的示例一樣, <i>標記在<b>標記之前關閉。
文本級元素 (TEXT-LEVEL ELEMENTS)
It is also known as inline elements, they affect the appearance of the text in a web-page.
也稱為內聯元素,它們會影響網頁中文本的外觀。
It is of two types,
它有兩種類型,
1) Physical Elements
1)物理元素
It is also known as the character formatting elements, it specifies the display of the text on the webpage. For example: to highlight or to underline the text in the webpage. Some commonly used elements are BOLD (<b>...</b>), ITALICS (<i>...</i>), UNDERLINE (<u>...</u>), SUPERSCRIPT (<sup>...</sup>), SUBSCRIPT (<sub>...</sub>), and STRIKE (<strike>...</strike>).
也稱為字符格式元素,它指定文本在網頁上的顯示。 例如:突出顯示或在網頁上加下劃線。 一些常用元素包括BOLD( <b> ... </ b> ),ITALICS( <i> ... </ i> ),UNDERLINE( <u> ... </ u> ),SUPERSCRIPT( < sup> ... </ sup> ),SUBSCRIPT( <sub> ... </ sub> )和STRIKE( <strike> ... </ strike> )。
2) Logical Elements
2)邏輯元素
It describes the logical or general description of the webpage. These elements are used to define the structural importance of the text. Some commonly used logical elements are SAMPLE, CODE, CITE, STRONG, EMPHASIS, VARIABLE.
它描述了網頁的邏輯或一般描述。 這些元素用于定義文本的結構重要性。 一些常用的邏輯元素是SAMPLE,CODE,CITE,STRONG,EMPHASIS,VARIABLE。
塊級元素 (BLOCK-LEVEL ELEMENTS)
The block elements are used for defining a block of text in the HTML document. These elements could be nested and used. It gives a structure of a block containing other block elements. Some common examples are HEADING, PARAGRAPH, BREAK, HR AND CENTER.
塊元素用于定義HTML文檔中的文本塊。 這些元素可以嵌套和使用。 它給出了包含其他塊元素的塊的結構。 一些常見的示例是HEADING,PARAGRAPH,BREAK,HR和CENTER。
HTML的一些元素 (Some Elements of HTML)
<HTML>
<HTML>
This element defines the ones complete HTML document. Also, it is used as the first tag of the HTML document. It is a container element as it has both the starting and closing tag.
該元素定義了完整HTML文檔。 此外,它還用作HTML文檔的第一個標簽。 這是一個容器元素,因為它同時具有開始和結束標簽。
<HTML> ... </HTML><BODY>
<身體>
This element defines the body of the document. The element or the content that has to be added to the webpage is given in the HTML body. It has both the starting and the ending tag.
此元素定義文檔的主體。 HTML正文中提供了必須添加到網頁的元素或內容。 它同時具有開始和結束標記。
<BODY> ... </BODY><HEAD>
<頭>
The element is used for the head of the document. This element contains the title of the document, linking to scripts, adding style by style tag, etc.
該元素用于文檔的開頭。 該元素包含文檔的標題,鏈接到腳本,通過樣式標簽添加樣式等。
<HEAD><TITLE> MY TITLE </TITLE><STYLE> . . . </STYLE></HEAD>翻譯自: https://www.includehelp.com/html/introduction-to-elements-in-html.aspx
清除元素中的子元素html
總結
以上是生活随笔為你收集整理的清除元素中的子元素html_HTML中的元素简介的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 机器学习 训练验证测试_测试前验证| 机
- 下一篇: HTML中的类属性