homepage Welcome to WebmasterWorld Guest from 54.227.12.219
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
fieldset not valid HTML?
SilverSpirit




msg:4426261
 12:23 am on Mar 8, 2012 (gmt 0)

I applied to Infolinks in order to experiment with them on my sites. My application was denied because of 'incompatible tags'. After having written to support, I received the following reply:
The <fieldset> tag is used to group related elements in a form (draws a box around the related elements). The Infolinks algorithm systematically ignores the contents of the <fieldset> tag to avoid placing highlighted links in forms.


Well, I have dozens of fieldsets in my sites, and none of them are in forms. Are fieldsets supposed to be ONLY in forms?

 

tedster




msg:4426342
 5:32 am on Mar 8, 2012 (gmt 0)

Here's what the W3C has to say:

The <fieldset> element represents a set of form controls optionally grouped under a common name.

[w3.org...]

How do your pages use <fieldset> if it's not for form controls?

SilverSpirit




msg:4426344
 6:19 am on Mar 8, 2012 (gmt 0)

I have always been using fieldset outside of forms to make a simple box

like this


for which, amazingly, webmasterworld uses table / tr / td - a lot of code for the same result!

It's so much shorter with fieldset, and it validates 100%.

SilverSpirit




msg:4426346
 6:28 am on Mar 8, 2012 (gmt 0)

According to webdesign.about.com

The <fieldset> tag is valid within the following tags:
blockquote, body, center, dd, div, fieldset, form, iframe, li, noframes, noscript, object, td, th


and it seems to work like that in all browsers, including on my Android.

Not sure about the source of that information, though.

lucy24




msg:4426361
 7:38 am on Mar 8, 2012 (gmt 0)

{padding: .5em; border: 1px solid black;}

Fotiman




msg:4426517
 2:30 pm on Mar 8, 2012 (gmt 0)


Are fieldsets supposed to be ONLY in forms?

According to HTML 4.01 [w3.org], XHTML 1.0 [w3.org], and HTML 5 [w3.org] a fieldset is not restricted to forms only. With that said, *typical* usage is in a form.

The Infolinks algorithm systematically ignores the contents of the <fieldset> tag to avoid placing highlighted links in forms.

It sounds to me like their algorithm is flawed. If they want to avoid placing highlighted links in forms, then they should ignore the contents of the <form> tag, not <fieldset>.

rocknbil




msg:4426558
 5:11 pm on Mar 8, 2012 (gmt 0)

In terms of semantics, I "kind of" agree with them, regardless of the spec. An <li> should be a "list of items" and shouldn't contain paragraph elements, headings, etc. but according to the spec it's perfectly legal. In the same way, a fieldset implies a set of fields by it's very name - even though your usage is perfectly "legal".

That's just opinion though - the bottom line is that if you want to use their service, you need to follow their specifications. You can do a global search and replace to use some other element, can't you?

Another tact would be to just wrap it in an empty form element with empty actions (seems kind of silly but might be a quick fix.)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved