如何在HTML文本下添加一个虚线下划线 [英] How to Add a Dotted Underline Beneath HTML Text

查看:1897
本文介绍了如何在HTML文本下添加一个虚线下划线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你如何强调HTML文本,以便文本下面的行是点缀而不是标准下划线?最好,我想这样做,而不使用单独的CSS文件。我是html的新手。

How do you underline html text so that the line beneath the text is dotted rather than the standard underline? Preferably, I would like to do this without using a separate CSS file. I'm a novice at html.

推荐答案

没有CSS,这是不可能的。事实上,< u> 标签只是在浏览器内置的文本中添加 text-decoration:underline 在CSS中。

It's impossible without CSS. In fact, the <u> tag is simply adding text-decoration:underline to the text with the browser's built-in CSS.

以下是您可以执行的操作:

Here's what you can do:

<html>
<head>
<!-- Other head stuff here, like title or meta -->

<style type="text/css">
u {    
    border-bottom: 1px dotted #000;
    text-decoration: none;
}
</style>
</head>
<!-- Body, content here -->
</html>

这篇关于如何在HTML文本下添加一个虚线下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆