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.
No description
7 Replies
ἔρως
ἔρως3w ago
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
snxxwyy
snxxwyy3w ago
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?
ἔρως
ἔρως3w ago
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 doesnt
snxxwyy
snxxwyy3w ago
fair enough then. i'm pretty sure the input tag does though right?
ἔρως
ἔρως3w ago
yes, it does but this allows you to disable a group of inputs
snxxwyy
snxxwyy3w ago
Yeah that’s definitely useful. Thanks for the info
ἔρως
ἔρως3w ago
you're welcome
Want results from more Discord servers?
Add your server