How to use html legend tag

青灯夜游
Release: 2019-05-27 13:33:03
Original
3890 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template