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