首頁  >  文章  >  web前端  >  HTML 罷工標籤

HTML 罷工標籤

王林
王林原創
2024-09-04 16:31:20328瀏覽

html有一組不同的標籤,用於使用建立的網頁更具吸引力,並且必須滿足使用者定義的要求。每個版本的 html 都有一組不同的應使用的功能,其中一些功能已從舊版本到新版本棄用。同樣的事情是 html 中的標籤之一,它透過 html 網頁中的刪除線文字指定。現在,該標籤已被棄用;現在使用標籤取代 html 中的標籤。主要在html5中,這個標籤不能用;相反,它支援 ,否則它將在文件中使用 CSS 樣式。

文法:

strike 標籤具有以下語法,將在 html 網頁中使用。

<html>
<body>
<strike>--content--</strike>
</body>
</html>

以上程式碼是基本語法;它將使用 中的使用者內容。網頁中的標籤。它還將使用 HTML 中的全域屬性,並且還使用事件屬性。在 HTML 中, 總是標籤成對出現,並且套用相同的一般規則,總是以開頭。並關閉罷工>必須使用標籤。

如何在 HTML 中使用 Strike 標籤?

  • 每當在html中使用strike標籤建立刪除線文字時,我們也可以在
  • 儘管與其他用於設計網頁內容的呈現框架相比,CSS 總是很棒,但它沒有提供內容的任何確切含義,這就是為什麼我們使用html 語義標籤,與CSS 相比,甚至比兩者都好得多和標籤在html 中使用刪除線內容,但這兩個標籤將以不同的方式傳達含義。
  • 如果我們想要表示網頁上某些內容的內容,但它不再準確或與該文字不相關,則將使用標籤。
  • 在html文件或專案需求中,我們不應該使用它來編輯文件。如果我們想要刪除html文檔中的某些內容就會使用標籤。
  • html ;標籤始終使用網頁中心位置的水平線透過文字給出文字外觀。刪除線主要用在標記文字中,如果發生錯誤,或會使用其他一些 html 標籤(例如 .
  • )自動刪除刪除線。
  • 預設情況下,在網頁中,文字位於刪除線中,該刪除線處於空閒位置,用於顯示給定文字中的修正。它在表格格式以及基於 CSS 樣式的其他格式等佈局中同樣有效。
  • 與某些短語一樣,它取決於 html 標籤;它將結合其他一些方式難以實現用戶一致性的情況,因為我們知道開始和結束標籤是在html文字中的刪除線中顯示的。
  • 標籤可以添加具有功能的樣式;這些必須透過在開始 之後添加屬性來完成。標籤。
  • strike 標籤允許使用所有屬性作為包含的類別、目錄、id、語言、標題和樣式。但可能大多數情況下,類別和id 的使用方式類似於所有屬性之上的 某些內容,我們會注意到,strike 標籤內容初始化後有一個空格,然後是屬性名稱,如果我們使用任何等號運算子以及使用雙引號的屬性識別碼。
  • 在 CSS Styling 中,class 和 id 屬性都像 CSS 一樣稱為元素,而且它會儲存在 或 中。外部文件中網頁的標籤。通常使用id,它指的是網頁的單一實例,但如果我們主要使用class屬性,它指的是網頁上的重複元素,用於此目的html ;標籤在html 文件中的id 或class 屬性中使用。
  • 如果我們使用這些屬性中的任何一個,它將在 CSS 樣式資訊中允許 中允許使用資料。標籤。在html的dir屬性中,基本上,它允許讀取網頁左側和右側的文本,lang屬性允許根據使用者需求指定網頁中標籤的語言(如果需要超過2種語言)或多種語言,以允許在網頁中使用這些標籤。
  • 如果我們需要html頁面的標題內容可以使用標籤,它將允許使用者在 html 標籤中包含一些額外的資訊。

HTML Strike 標籤範例

下面給出的是 HTML Strike 標籤的範例。

Example #1

Code:

<html>
<body>
<p>Welcome <strike>To My Domain</strike> Thanks</p>
</body>
</html>

Output:

HTML 罷工標籤

Example #2

Code:

<html>
<head>
<style>
.sample{
color:blue;
}
body {
text-align:center;
}
</style>
</head>
<body>
<div class="sample">
<strike>Welcome</strike>
<strike>To My Domain</strike>
</div>
</body>
</html>

Output:

HTML 罷工標籤

Example #3

Code:

<html>
<head>
<style>
.sample{
color:red;
}
body {
text-align:center;
}
</style>
</head>
<body>
<div class="sample">
<ol>
<li>Apples</li>
<li><del>Mangoes</del></li>
<li><del>Strawberry</del></li>
</ol>
</div>
</body>
</html><strong>  </strong>

Output:

HTML 罷工標籤

The above examples show the tag usages in HTML documents. We see the first example will use the tag in html document in that mentioned contents will be deprecated in the web page same second example we will use some CSS styles applied in the web pages based on that it will be displayed in the web page views on the user screen the final example we use the tag in the document instead of tag same purpose the mentioned contents or text will be removed in the web page. The Same tag will be worked on some other frameworks like bootstrap and jquery libraries also; it will be used in the ionic Angular frameworks etc.

Conclusion

Based on the above concepts, the surface of the HTML tag will be easy to see how versatile it is in web page users. It will take full advantage of the understanding of CSS frameworks, and also it will work with jquery, Angular but the purpose will be different for each technologies.

以上是HTML 罷工標籤的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn