HTML <u> 標籤
更多“自己嘗試”的例子見下文。
定義和用法
The <u>
tag represents some text that is unarticulated and styled differently from normal text, such as misspelled words or proper names in Chinese text. The content inside is typically displayed with an underline. You can change this with CSS (see example below).
提示: 避免使用 <u>
元素,因為它可能被誤認為是超連結!
瀏覽器支援
元素 | |||||
---|---|---|---|---|---|
<u> | 是 | 是 | 是 | 是 | 是 |
全域性屬性
The <u>
tag also supports the HTML 中的全域性屬性.
事件屬性
The <u>
tag also supports the HTML 中的事件屬性.
更多示例
示例
使用 CSS 設定拼寫錯誤文字的樣式
<html>
<head>
<style>
.spelling-error {
text-decoration-line: underline;
text-decoration-style: wavy;
text-decoration-color: red;
}
</style>
</head>
<body>
<p>This is some <u class="spelling-error">mispeled</u> text.</p>
</body>
</html>
自己動手試一試 »
相關頁面
HTML 教程:HTML 文字格式化
HTML DOM 參考: Underline Object
預設 CSS 設定
Most browsers will display the <u>
element with the following default values