fieldset & legend
Hey, i have a couple of questions:
1) is the
fieldset
tag simply just used for grouping inputs and labels within a form or is there more to it?
2) is the legend
tag used to simply label the fieldset, or is it used for a question like in the example image?
3) what makes the legend
tag sit on top of the fieldset
border (see image). Is this just built in functionality since there isn't anything in the user agent style sheet that could place it there, such as position: absolute
? Is there a way to move it?
Thank you in advance.7 Replies
1- it's a more general grouping
it also allows disabling EVERYTHING inside it
2- basically, yes, but it is very important
3- default styles
the user agent (browser) and the spec say how it is supposed to be rendered, by default
I thought you could disable everything via the form tag too?
Ah so you can’t move it from sitting on a border? If you remove the border it won’t look like that of course but if it has a border it always sits on it?
you can do whatever you want
the default is what you see
and i don't think a form has a
disabled
attribute
you, it doesntfair enough then. i'm pretty sure the
input
tag does though right?yes, it does
but this allows you to disable a group of inputs
Yeah that’s definitely useful. Thanks for the info
you're welcome