This code does not validate. This is counter-intuitive to me. Inputs belong in a from correct? Yet I get a validation error for each element with in the form – input,input,a,a – to this effect:
Seems absurd to wrap it in a fieldset and then add CSS to take out the fieldset box.
Line 37, Column 91: document type
does not allow element “input” here;
missing one of “p”, “h1”, “h2”, “h3”,
“h4”, “h5”, “h6”, “div”, “pre”,
“address”, “fieldset”, “ins”, “del”
start-tag
<form id="f3"method="post"action="interface_add.php">
<input onkeydown="this.value=''"class="te3"type="text"name="f3a"value="title"/>
<input onkeydown="this.value=''"class="te3"type="text"name="f3b"value="url"/>
<a id="f3c"class='but'href="javascript:void(0)"onclick="interface_add()">Add</a>
<a id="f3d"class='but'href="javascript:void(0)"onclick="interface_delete()">Delete</a>
</form>
It is highly recommended (it may even be required in strict) to use a
<fieldset>when creating a form. You should include a<legend>as well.But why should you really do it? Accessibility. Screen readers read this information so a user knows what information they should be providing in the grand scheme. I’m pretty sure Section 508 requires it’s use as well. It’s been argued that federal laws don’t apply to private websites, but tell that to Target, who was sued over accessibility issues.
In reality, it’s not hurting anything to include it. And you can style it as you will.