I
Ian
This may come across as an odd question, as I've already been doing this, and plan on still doing it. I guess what I want to know is, what is the exact reason to avoid using this trick? I assume it has to do with semantics, but is a screen reader, for instance, going to get confused when it comes across a fieldset that isn't inside a form element, or will it just render itand move on?
Here is an example:
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<fieldset>
<legend>Test</legend>
<ul>
<li>Lorem</li>
<li>Ipsum</li>
<li>Globben</li>
<li>Globen</li>
</ul>
</fieldset>
</body>
</html>
This validates as HTML5, even though I didn't include a character encoding.
I bring this up because either alt.html or CIWAH was where I was told not to use this trick, many moons ago, but I don't really know why. I realize that fieldset is not designed for use outside forms, but it works beautifully..
Hope someone out there has some thoughts on this. Hope all are well.
Here is an example:
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<fieldset>
<legend>Test</legend>
<ul>
<li>Lorem</li>
<li>Ipsum</li>
<li>Globben</li>
<li>Globen</li>
</ul>
</fieldset>
</body>
</html>
This validates as HTML5, even though I didn't include a character encoding.
I bring this up because either alt.html or CIWAH was where I was told not to use this trick, many moons ago, but I don't really know why. I realize that fieldset is not designed for use outside forms, but it works beautifully..
Hope someone out there has some thoughts on this. Hope all are well.