I need to make one of my h4 tags for a form be a legend tag but the default properties of the legend tag is so different. I'm doing this to meed accessibility standards. Is there a way to strip the legend tag of all of it's properties so it's just like a h4 tag? I've tried putting the legend tag inside h4 and using inherit but that doesn't work.
Asked
Active
Viewed 59 times
1
-
Consider rewriting your post to be a [minimal, complete, verifiable example](http://stackoverflow.com/help/mcve) with the code you have tried so far. – chazsolo Jun 07 '16 at 18:15
1 Answers
1
This question has been answered here: https://stackoverflow.com/a/3973527/2096258.
But the short answer is that the <legend> tag cannot be completely stripped of its styles. If you place your <h4> inside the <legend> (which I think would be more semantic anyway) and then wrap the <legend> in a <span> (as stated in the page I included above), then you might be able to use the <span> to adjust any positioning issues that are caused by the <legend> tag.
Hope this helps.
Community
- 1
- 1
Sean Vinci
- 46
- 8