html The legend tag is used to define the title (caption) for the fieldset element. The
#html How to use the legend tag?
Function: Define the title (caption) for the fieldset element.
Note: All browsers support the
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
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:
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!