html注釋引用公共頭部
HTML注釋 (HTML Comments)
To insert a comment in an HTML document, the comment tags are used. The comments are used to provide some information that could be useful for anyone who views the code of the webpage. The comments can be inserted by any number of times within the webpage. Also, a notable point is that the comments are not visible on the webpage. That means the text in the comments are ignored by the web browser and thus it is not visible on the webpage.
要在HTML文檔中插入注釋 ,請使用comment標簽 。 注釋用于提供一些信息,這些信息對于查看網頁代碼的任何人都可能有用。 注釋可以在網頁中插入任意次。 另外,值得注意的一點是,注釋在網頁上不可見。 這意味著注釋中的文本被網絡瀏覽器忽略,因此在網頁上不可見。
The HTML comments are placed between the symbols <!-- text -->
HTML注釋放在符號<!-文本->之間
The syntax of the comment tag is as,
comment標記的語法為
<!--
This is a comment in the HTML document.
-->
The comments could be inserted in wherein the document. It increases the readability of the code in the document. Also, the comments in HTML are supported by almost all of the present-day browsers. These comments are multi-line comments.
注釋可以插入文檔所在的位置。 它提高了文檔中代碼的可讀性。 而且,幾乎所有當今的瀏覽器都支持HTML中的注釋。 這些評論是多行評論。
Below is an example to illustrate the use of comments,
以下是說明注釋用法的示例,
<!-- The sample HTML code -->
<html>
<body>
<p>Line before the comment.</p>
<!--
This is the comment line
any text can be written here
that will not display on the webpage.
-->
<p>Line after the comment.</p>
</body>
</html>
Output
輸出量
HTML報價 (HTML Quotation)
<q> elements: The quotations in HTML document are added by using the <q> tag. The text which is to be displayed in quotes is written in between the <q> tag.
<q>元素: HTML文檔中的引號是使用<q>標記添加的。 要在引號中顯示的文本寫在<q>標記之間。
Example:
例:
<p>Welcome at <q>IncludeHelp</q>.</p>
Output
輸出量
Welcome at "IncludeHelp".
The <q> tag is used for the small quotation in the text.
<q>標記用于文本中的小引用。
<blockqoute> element
<blockqoute>元素
The <blockquote> element is also used for creating quotations. But it is somewhat different from the <q> element. Unlike the <q> tag, the <blockqoute> do not put quotations(") in the text, but it changes the alignment of the text to make it different from other texts on the webpage. The browser generally intends the content in the BLOCKQUOTE tag.
<blockquote>元素也用于創建報價。 但這與<q>元素有些不同。 與<q>標記不同, <blockqoute>不會在文本中加上引號( “ ),但會更改文本的對齊方式,使其與網頁上的其他文本有所不同。瀏覽器通常將內容放在BLOCKQUOTE中標簽。
An example of <blockqoute> tag
<blockqoute>標簽的示例
<!-- The sample HTML code -->
<html>
<body>
<p>
the text is blockqoute is quoted differently then the other text
<blockquote> some text in the BLOCKQOUTE element </blockquote>
</p>
</body>
</html>
Output
輸出量
<address>元素 (<address> element)
The <address> element specifies an address within the webpage and the text that is inside the address tag would be emphasized. It also has both the tags: opening and closing tags.
<address>元素指定網頁內的地址,并且地址標簽內的文本將被強調。 它還具有兩個標簽:開始和結束標簽。
An example of <address> tag
<address>標簽的示例
<!-- The sample HTML code -->
<html>
<body>
<address>
<p>
Address:<br>
123-block, LN road<br>
Sector-110, Delhi
</p>
</address>
</body>
</html>
Output
輸出量
<abbr>元素 (<abbr> element)
The <abbr> element is used to define a text as an acronym or abbreviations. The title attribute can be used to show the full version of the abbreviation/acronym when you mouse over the <abbr> element. It has both opening and closing tags.
<abbr>元素用于將文本定義為首字母縮寫詞或縮寫。 當您將鼠標放在<abbr>元素上時,title屬性可用于顯示縮寫/縮寫的完整版本。 它同時具有開始和結束標簽。
An example of <abbr> tag
<abbr>標簽的示例
<!-- The sample HTML code -->
<html>
<body>
<p>
place your mouse over the following text :
<abbr title=" World Wide Web "> www </abbr>
</p>
</body>
</html>
Output
輸出量
翻譯自: https://www.includehelp.com/html/html-comments-and-quotations.aspx
html注釋引用公共頭部