HTML 標籤


HTML 4 中的 <u> 元素用於給網頁上的文字加下劃線,但 HTML5 將 <u> 重新定義為顯示不同於普通文字的文字。

現在讓我們看一個實現 <u> 標籤的示例−

示例

 即時演示

<!DOCTYPE html>
<html>
<body>
<h2>Shortcut Keys</h2>
<p>Use the following <u>shortcut</u> keys:</p>
<p><strong>Cut</strong>: <tt>CTRL</tt>+<tt>X</tt></p>
<p><strong>Copy</strong>: <tt>CTRL</tt>+<tt>C</tt></p>
<p><strong>Paste</strong>: <kbd>CTRL</tt>+<tt>V</tt></p>
<p><strong>Undo</strong>: <tt>CTRL</tt>+<tt>Z</tt></p>
</body>
</html>

輸出

在上面的示例中,我們使用了 <ul> 標籤來顯示不同於預設普通文字的文字−

<p>Use the following <u>shortcut</u> keys:</p>
<p><strong>Cut</strong>: <tt>CTRL</tt>+<tt>X</tt></p>

更新日期:2019 年 7 月 30 日

29 次瀏覽

啟動您的職業生涯

完成課程獲得認證

開始
廣告
© . All rights reserved.