English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The align attribute specifies the alignment of the title within the fieldset.
Align the title to the right:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <legend> align Attribute Usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <form> <fieldset> <legend align="right">Personalia:</legend> Name: <input type="text" size="30"><br> Email: <input type="text" size="30"><br> Date of birth: <input type="text" size="10"> </fieldset> </form> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
The "left" and "right" values of the align attribute are supported in all major browsers, but Opera 12and lower versions except. The "bottom" value does not work in all major browsers.
HTML5 The <legend> align attribute is not supported in HTML. Please use CSS instead.
In HTML 4.01 In HTML, the align attribute of the <legend> element is deprecated.
The align attribute specifies the alignment of the title within the fieldset.
<legend align="left|right|top|bottom">
Value | Description |
---|---|
left | Align the title to the left (default). |
right | Align the title to the right. |
top | Align the title upwards. |
bottom | Align the title downwards. |