473,545 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using <fieldset>/<legend> without forms

I'm curious as to the group's feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... I
wrote a small test file:
<http://www.learnsometh ingnew.us/fieldset.html>
to illustrate this, and it validated at both the W3C and WDG sites.
(It's a <fieldset> around a <table> and <p>).

I'm able to view it on Opera 7.23, Mozilla 1.6, and IE 6. (Moz 1.6
renders it in Standards Compliance Mode as well.)

This interests me, because it seems like such a shame that we can't
use <fieldset> for anything we want, since it's so handy. Here's the
write-up in the HTML 4.01 spec: <http://tinyurl.com/2sbn4>. I don't
know how to read a DTD, but I don't see any mention of forms except
in commented sections.

Is it likely that HTML written along these lines will break in
future browsers? If not, is there any compelling reason not to use
<fieldset> in any way that validates?

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/
Jul 20 '05 #1
14 10755
Ian Rastall <id*******@sbcg lobal.net> wrote:
I'm curious as to the group's feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... - - Is it likely that HTML written along these lines will break in
future browsers?


Many people say that <fieldset> and <legend> are broken in _current_
browsers, not to mention old browsers that don't get them at all.

I think the main concern is user confusion. Form fields should look
like form fields, and other things shouldn't.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote:
Ian Rastall <id*******@sbcg lobal.net> wrote:
I'm curious as to the group's feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... - -
Is it likely that HTML written along these lines will break in
future browsers?


Many people say that <fieldset> and <legend> are broken in _current_
browsers, not to mention old browsers that don't get them at all.


I'm curious what you mean by "broken". I've just used them for the
first time, and find them to look just as they ought to by default in
both IE6 and Mozilla, grouping controls and labeling them. Are they
meant to have some kind of function beyond that?
I think the main concern is user confusion. Form fields should look
like form fields, and other things shouldn't.


I'm guessing the OP is using form fields for some kind of client-side
application served over the web. Most users have no conception of what
an HTML form is or whether a given control is on one or not.
Semantically, if you're not submitting data for server-side
processing, shouldn't the controls be used without a <form>? But a
checkbox should still look to the user like a checkbox, and a button
like a button.
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #3
Ian Rastall wrote:
I'm curious as to the group's feelings about using the <fieldset>
and <legend> tags around elements other than <form> elements ... I
wrote a small test file:
<http://www.learnsometh ingnew.us/fieldset.html>
to illustrate this, and it validated at both the W3C and WDG sites.
(It's a <fieldset> around a <table> and <p>).
If a fieldset contains no fields, is it a fieldset?
This interests me, because it seems like such a shame that we can't
use <fieldset> for anything we want, since it's so handy.
I don't see why it is so handy in your example. What is the purpose of
having it, besides the visual effect?
Is it likely that HTML written along these lines will break in
future browsers? If not, is there any compelling reason not to use
<fieldset> in any way that validates?


Semantics. A fieldset "allows authors to group thematically related
controls and labels". You are not using it to group any form
controls/labels at all.

It appears that the only use for it here is the default visual effect in
browsers, one that wouldn't be that hard to replicate with more
semantically accurate tags.

--
Bill Mason
Accessible Internet
http://www.accessibleinter.net/
prefix @accessibleinte r.net with anything to reply
Jul 20 '05 #4
On Sun, 01 Feb 2004 23:52:50 -0500, Ian Rastall <id*******@sbcg lobal.net>
wrote:
This interests me, because it seems like such a shame that we can't
use <fieldset> for anything we want, since it's so handy.


Yeah, and it's a shame we can't wrap the whole body in a <h1> tag since
that looks cool too. Plus it solves the readability issue.
Jul 20 '05 #5
On Wed, 04 Feb 2004 04:10:28 GMT, Bill Mason
<us****@accessi bleinter.net> wrote:
I don't see why it is so handy in your example.
It wasn't meant to illustrate its usefullness ... just that it
rendered.
What is the purpose of having it, besides the visual effect?


It's just another way of grouping things together. The advantage
over using, say, a <div> with a border, is that you can label it. In
a site with headline news, for instance, you could organize the
headlines in this way, and make the contents of the <legend> tag a
link to the full article. In fact, despite the impression it makes
of being purely visual, it seems like more of a structural tag.

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/
Jul 20 '05 #6
On Wed, 04 Feb 2004 04:18:49 -0500, Ian Rastall
<id*******@sbcg lobal.net> wrote:
In a site with headline news, for instance, you could organize the
headlines in this way, and make the contents of the <legend> tag a
link to the full article.


Come to think of it, being able to use a <legend> tag to add a
caption to a bordered <div> could be very useful ... forget
<fieldset>.

Ian
--
http://www.aspipes.org/
http://www.bookstacks.org/
http://www.learnsomethingnew.us/
Jul 20 '05 #7

"Harlan Messinger" <hm************ *******@comcast .net> wrote in message
news:rm******** *************** *********@4ax.c om...
"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote:


I'm sorry, I responded without having looked at his page. Obviously he's NOT
using fieldset the way it's meant to be used. He's using it for a look and
feel that is out of place and on which he can't depend from browser to
browser.

Jul 20 '05 #8
Harlan Messinger <hm************ *******@comcast .net> wrote:
Many people say that <fieldset> and <legend> are broken in _current_
browsers, not to mention old browsers that don't get them at all.


I'm curious what you mean by "broken". I've just used them for the
first time, and find them to look just as they ought to by default in
both IE6 and Mozilla, grouping controls and labeling them. Are they
meant to have some kind of function beyond that?


The people who say that they are broken mainly refer to the visual
appearance that has a border around the fieldset, with the legend
partly covering it. And is there any _functionality_ associated with
fieldset markup? Besides, making the legend obligatory is odd (though
in practice it can be left empty).

It's largely a matter of taste whether such appearance is good or bad,
but it seems to be difficult to style it in CSS - actually I don't
think there's a way to _describe_ all of its features in CSS even in
principle.

I find it somewhat strange that some people refuse to use fieldset in
forms due to the persistent appearance which they regard as poor, and
some other people would use fieldset just because of the appearance.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #9

"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote in message
news:Xn******** *************** ******@193.229. 0.31...
Harlan Messinger <hm************ *******@comcast .net> wrote:
Many people say that <fieldset> and <legend> are broken in _current_
browsers, not to mention old browsers that don't get them at all.
I'm curious what you mean by "broken". I've just used them for the
first time, and find them to look just as they ought to by default in
both IE6 and Mozilla, grouping controls and labeling them. Are they
meant to have some kind of function beyond that?


The people who say that they are broken mainly refer to the visual
appearance that has a border around the fieldset, with the legend
partly covering it.


They call that broken? I don't know about other OSes, but that's what
control group frames have looked like on Windows all along. I never saw
anything wrong with it.
And is there any _functionality_ associated with
fieldset markup? Besides, making the legend obligatory is odd (though
in practice it can be left empty).

It's largely a matter of taste whether such appearance is good or bad,
but it seems to be difficult to style it in CSS -
Ah. I see.
actually I don't
think there's a way to _describe_ all of its features in CSS even in
principle.

I find it somewhat strange that some people refuse to use fieldset in
forms due to the persistent appearance which they regard as poor, and
some other people would use fieldset just because of the appearance.


Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1883
by: Domestos | last post by:
Hi all - please help... using <FORM> HTML tag for user input and need to get get data from it and store in php variable... <input type="text" name="user_name" size="18" maxlength="16" class="input_left" tabindex="11" />
9
2043
by: Warren Post | last post by:
At <http://snow.prohosting.com/srcopan/src/search.html> I have a simple form, using the following code provided by my site search provider: <form method="get" action="http://search.atomz.com/search/"> <input size="20" name="sp-q"><br> <input type="submit" value="Search"> <input type="hidden" name="sp-a" value="sp06251400"> <input...
6
19586
by: joseph.lindley | last post by:
Forgive me for I am a bit of a web-dev novice - but I'm not doing too bad. I'm currently working with a bit of javascript to dynamically add <option>s into a select box. My code currently works fine in Internet Explorer, however in Firefox the dropdown only displays the first option in the list, and when clicked the other values aren't...
4
26044
by: Adam Smith | last post by:
Hello, Can I use <fieldset><legend><tr><tr> </tr></tr></fieldset></legend> to select multiple rows in a Table such that I can demarcate several rows containing form elements in a table? Thanks
0
2394
by: bobmct | last post by:
Gentlemen; I'm in the process of migrating several pages from HTML under frames to noframes using css using the three or four box design. For most of my efforts its going well. However, one area that's giving me a lot of grief is where I've encountered the user of <fieldset>. Whereas in the HTML use the box drawn by this tag simply...
5
5248
nathj
by: nathj | last post by:
Hi All, I'm working on a new site that has a two column layout underneath a title bar. If you check out: http://www.christianleadership.org.uk/scratch/mainpage.php using IE or Opera you will see what I am after as these browsers work fine. However, in FF the results are slightly different - take a look and you'll see that the <p>, within...
9
4560
by: Geoff Cox | last post by:
hello when I use <fieldset><legend></legend> <input type="hidden" name="subject" value="Course"> <input type="hidden" name="recipient" value="allemails"> <input type="hidden" name="email" value="fred@jim.com"> <input type="hidden" name="redirect" value="thanks.htm"> <input type="hidden" name="required" value="name,user-email">
5
13314
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the...
6
19263
goatboy
by: goatboy | last post by:
So I am hosting a site from my home server, and I would like the main page to be an area for updates about the site. I am providing these updates in a blog-style format, using this code: <form><fieldset> <legend>December 15, 2009</legend> <p>This is an update. Lorem ipsum, etc. etc. and so on.</p> --goatboy
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.