Html 如何在边框中放置文字

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7632259/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 10:53:59  来源:igfitidea点击:

how to put text in border

htmlcss

提问by JavaGeek

I'm trying to insert some text in border but don't know how to do.

我正在尝试在边框中插入一些文本,但不知道该怎么做。

How can i put some text in middle of border.

如何在边框中间放置一些文本。

Below is the screen-shot it should look like

下面是它应该看起来像的屏幕截图

enter image description here

在此处输入图片说明

回答by C.L.

Try HTML legend tag.

尝试 HTML 图例标签。

HTML legend

HTML 图例

回答by diEcho

use legendinside fieldset

字段集中使用 图例

The HTML Legend Field Element (<legend>) represents a caption for the content of its parent <fieldset>.

HTML Legend Field Element( <legend>) 表示其父级内容的标题<fieldset>

回答by Sai Kalyan Kumar Akshinthala

Create a group boxwith which you can get the functionality which you want in html.

创建一个组框,您可以使用它在 html 中获得所需的功能。