HTML <fieldset> Tag
Description
The <fieldset>
HTML element specifies a set of form fields. It is generally used to group logically related controls and labels within a web form. Grouping form controls makes it easier for users to understand their purpose and makes the documents more accessible.
For greater clarity, browsers display the result of using the <fieldset>
element as a frame. Its appearance depends on the operating system, as well as the browser used.
Properties
- Permitted Parents
- Any element that accepts flow content
- Content
<legend>
as first child; after that block, inline, and text- Start/End Tags
- Start tag: required, End tag: required
Example
<form>
<fieldset>
<legend>Personal Information:</legend>
Name: <input type="text" size="30" />
Email: <input type="text" size="30" />
</fieldset>
</form>
Attributes
Attribute | Definition |
---|---|
disabled | Specifies that a group of related form elements should be disabled. |
form | Specifies one or more forms the fieldset belongs to. |
name | Specifies a name for the fieldset. |
Global Attributes
The <fieldset>
tag also supports the Global Attributes in HTML5
Event Attributes
The <fieldset>
tag also supports the Event Attributes in HTML5
Browser Support
Desktop | |||||
Yes | Yes | Yes | Yes | Yes | Yes |
Tablets / Mobile | |||||
![]() |
|||||
Yes | Yes | Yes | Yes | Yes | Yes |
Last updated by CSSPortal on: 6th December 2019
HTML Tags
- a
- abbr
- address
- area
- article
- aside
- audio
- b
- base
- bdi
- bdo
- blockquote
- body
- br
- button
- canvas
- caption
- cite
- code
- col
- colgroup
- comment
- datalist
- dd
- del
- details
- dfn
- dialog
- div
- dl
- doctype
- dt
- em
- embed
- fieldset
- figcaption
- figure
- footer
- form
- h1
- h2
- h3
- h4
- h5
- h6
- head
- header
- hr
- html
- i
- iframe
- img
- input
- ins
- kbd
- keygen
- label
- legend
- li
- link
- map
- mark
- menu
- meta
- meter
- nav
- noscript
- object
- ol
- optgroup
- option
- output
- p
- param
- picture
- pre
- progress
- q
- rp
- rt
- ruby
- s
- samp
- script
- section
- select
- small
- source
- span
- strong
- style
- sub
- summary
- sup
- table
- tbody
- td
- textarea
- tfoot
- th
- thead
- time
- title
- tr
- track
- u
- ul
- var
- video
- wbr