Home  >  Article  >  Web Front-end  >  How to use html legend tag

How to use html legend tag

青灯夜游
青灯夜游Original
2019-05-27 13:31:393875browse

html The legend tag is used to define the title (caption) for the fieldset element. The tag is supported in all browsers; use CSS to set the alignment of the element.

How to use html legend tag

#html How to use the legend tag?

Function: Define the title (caption) for the fieldset element.

Note: All browsers support the tag.

Note: In HTML 4.01, the align attribute is deprecated. In XHTML 1.0 Strict DTD, the align attribute is not supported. Please use CSS to set the alignment of the element.

html legend tag example

<!DOCTYPE HTML>
<head>
<meta charset="UTF-8">
</head>
<html>
<body>
<form>
<fieldset>
<legend>健康信息</legend>
身高:<input type="text" /> 体重:
<input type="text" />
</fieldset>
</form>
<p>如果表单周围没有边框,说明您的浏览器太老了。</p>
</body>
</html>

Rendering:

How to use html legend tag

The above is the detailed content of How to use html legend tag. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use html label tagNext article:How to use html label tag