HTML 標籤


HTML 中的 <s> 標籤用於標記已不相關的文字。此標籤在 HTML5 中被重新定義,以顯示不準確的文字。

我們來看一個實現 <s> 元素的示例:

示例

 演示

<!DOCTYPE html>
<html>
<body>
<h2>Exam Results</h2>
   <p><s>Result would be announced on 6th June.</s></p>
   <p>New date for results are 7th June.</p>
</body>
</html>

輸出

在上例中,我們設定了一個不再相關的文字:

<s>
Result would be announced on 6th June.
</s>

使用 <s> 將劃掉與上述輸出中顯示的文字相同的文字。

更新於:2020-06-11

82 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.