473,378 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

table inside form?

It is ok tu use a table tag inside a form tag?

(you know, you do not use h2 inside p, etc...)

--
Luciano A. Ferrer
la**************@SacaDMEgmail.com
.... un todo en uno y uno en todo
Apr 1 '06 #1
14 19335
This idea is very possible, though I have never tried it. It should
not mess up the HTML code, but if it does, you can just preview the
site in IE and then check the Error Warning sign in the bottom left
corner. I have had some simple errors in my site, but those were
discerned through this method. It actually caught a mispelling that I
made in a JavaScript, so it should catch most other problems.

_________________________________________

Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

Apr 1 '06 #2
Luciano A. Ferrer wrote:
It is ok tu use a table tag inside a form tag?


Syntactically it is fine. Semantically it may or may not be.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Apr 1 '06 #3
In article <e0**********@tramontana.micasa.mired>,
Luciano A. Ferrer <al************@arnet.com.ar> wrote:
It is ok tu use a table tag inside a form tag?


Yes, in fact this is quite common. It validates correctly too.

Form tags can contain anything, sort of like div tags.

-A
Apr 1 '06 #4
Gazing into my crystal ball I observed "Luciano A. Ferrer"
<al************@arnet.com.ar> writing in news:e0ktbi$7md$2
@tramontana.micasa.mired:
It is ok tu use a table tag inside a form tag?

(you know, you do not use h2 inside p, etc...)


Yes, you can put a table inside a form, which is what a lot of people do to
line up input elements, but there is a better way using CSS.

Here's an example:
<URL:http://www.intraproducts.com/usenet/requiredform.asp>

--
Adrienne Boswell
Please respond to the group so others can share
http://www.cavalcade-of-coding.info
Apr 1 '06 #5
axlq wrote:
Form tags can contain anything, sort of like div tags.


Not true.

<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->

Anything in the group "block" and script elements but not form elements.

<!ELEMENT DIV - - (%flow;)* -- generic language/style
container -->

Anything in the group "flow" (which includes everything in "block" but
also "inline".

(At least for HTML 4.01 Strict).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Apr 1 '06 #6
In article <Xn****************************@69.28.186.121>,
Adrienne Boswell <ar********@sbcglobal.net> wrote:
Yes, you can put a table inside a form, which is what a lot of
people do to line up input elements, but there is a better way
using CSS.

Here's an example:
<URL:http://www.intraproducts.com/usenet/requiredform.asp>


I disagree that's a better way. Discounting the fact that this
example is XHTML and not HTML, bear in mind that one of the
advantages of CSS is to reduce the bandwidth required to serve up
a page. In the example above, it seems to me that a table-based
for a form would be simpler, easier to understand, and consume less
bandwidth.

A table is entirely appropriate when you want to maintain both a
horizontal and vertical relationship between displayed elements.
That's what it's for.

-A
Apr 1 '06 #7
In article <e0*******************@news.demon.co.uk>,
David Dorward <do*****@yahoo.com> wrote:
axlq wrote:
Form tags can contain anything, sort of like div tags.


Not true.


I stand corrected; you can't have a form within a form, of course.

-A
Apr 1 '06 #8
axlq wrote:
I stand corrected; you can't have a form within a form, of course.


No, for example, can they directly contain free text, or form controls.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Apr 1 '06 #9
Gazing into my crystal ball I observed ax**@spamcop.net (axlq) writing in
news:e0**********@blue.rahul.net:
In article <Xn****************************@69.28.186.121>,
Adrienne Boswell <ar********@sbcglobal.net> wrote:
Yes, you can put a table inside a form, which is what a lot of
people do to line up input elements, but there is a better way
using CSS.

Here's an example:
<URL:http://www.intraproducts.com/usenet/requiredform.asp>


I disagree that's a better way. Discounting the fact that this
example is XHTML and not HTML, bear in mind that one of the
advantages of CSS is to reduce the bandwidth required to serve up
a page. In the example above, it seems to me that a table-based
for a form would be simpler, easier to understand, and consume less
bandwidth.

A table is entirely appropriate when you want to maintain both a
horizontal and vertical relationship between displayed elements.
That's what it's for.

-A


Bandwidth? 3463 bytes with a table and 3125 bytes with CSS and no tables,
and that would be further reduced because one would use an external
stylesheet.

CSS HTML 4.0 <URL:http://www.cavalcade-of-
coding.info/usenet/requiredform.html>
Table HTML 4.0 <URL:http://www.cavalcade-of-
coding.info/usenet/requiredform_table.html>

In recreating the form using tables, I found it to not be simpler at all.
Getting the form to display the same way using HTML attributes vs CSS
properties was not easy, and is still not quite right.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.cavalcade-of-coding.info
Apr 1 '06 #10
ax**@spamcop.net (axlq) wrote in news:e0**********@blue.rahul.net:
In article <Xn****************************@69.28.186.121>,
Adrienne Boswell <ar********@sbcglobal.net> wrote:
Yes, you can put a table inside a form, which is what a lot of
people do to line up input elements, but there is a better way
using CSS.

Here's an example:
<URL:http://www.intraproducts.com/usenet/requiredform.asp>

I disagree also, but for different reasons. I tell my students that
any time they are using <br> very often, they should rethink what they
are doing. I have no problem using a table in a form as it is my
opinion that the labels and inputs constitute tabular data.
I disagree that's a better way. Discounting the fact that this
example is XHTML and not HTML, bear in mind that one of the
advantages of CSS is to reduce the bandwidth required to serve up
a page. In the example above, it seems to me that a table-based
for a form would be simpler, easier to understand, and consume less
bandwidth.
The example being XHTML rather than HTML really makes no difference to
the discussion. Also, I don't think the example would use any more
bandwidth than using a table; all of the extra stuff you see there
(javascript) could be used as easily with a table as with the code in
the example.
A table is entirely appropriate when you want to maintain both a
horizontal and vertical relationship between displayed elements.
That's what it's for.


No, that's not what a table is for. You are thinking layout instead of
semantics. A table is to contain tabular data. Whether it lines up or
not is an irrelevant presentational issue. But I do agree that a table
is appropriate for the reason I gave above.

--
Stan McCann, "Uncle Pirate" http://stanmccann.us/
Webmaster, NMSU Alamogordo http://alamo.nmsu.edu/
Implementing http://blinkynet.net/comp/uip5.html
Apr 1 '06 #11
Luciano A. Ferrer wrote :
It is ok tu use a table tag inside a form tag?

(you know, you do not use h2 inside p, etc...)

One easy and quick way to know is to visit this page:

http://www.htmlhelp.org/reference/html40/alist.html

then click on the element (e.g. table) and then read the "Contents" and
"Contained in" paragraphs.

Another way is to validate your webpage with the W3C HTML validator.

http://validator.w3.org/

Since you'll most likely benefit from validating your page anyway (it
will report any other errors you may have), you might as well use this way.

Gérard
--
remove blah to email me
Apr 2 '06 #12
In article <Xn************************@216.234.192.142>,
Stan McCann <me@stanmccann.us> wrote:
A table is entirely appropriate when you want to maintain both a
horizontal and vertical relationship between displayed elements.
That's what it's for.
No, that's not what a table is for. You are thinking layout instead of
semantics.


No, I'm thinking strictly in terms of tabular data, in which you
want to maintain a horizontal and vertical relationship between
displayed elements. As I said, that's what a table is for. We agree
that it's appropriate in this case.

The other argument I made, that a table will consume less bandwidth
than doing the same thing in CSS, is apparently wrong. In that
case, I would argue that if there's no bandwidth advantage, why
bother with CSS? At least with a table, a casual reader of the
source code can figure out the tabular relationship, which isn't
clear with CSS.
A table is to contain tabular data. Whether it lines up or
not is an irrelevant presentational issue.


It's very relevant for tabular data... which we both agree this is.

-A
Apr 2 '06 #13
Sat, 1 Apr 2006 15:50:35 +0000 (UTC) from axlq <ax**@spamcop.net>:
In article <e0**********@tramontana.micasa.mired>,
Luciano A. Ferrer <al************@arnet.com.ar> wrote:
It is ok tu use a table tag inside a form tag?


Yes, in fact this is quite common. It validates correctly too.

Form tags can contain anything, sort of like div tags.


More specifically, as I discovered when I posted a question here a
week or so ago, they can contain any block-type element. I you simply
put controls like <input> directly inside the form, it fails
validation as Strict but succeeds as Transitional.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Apr 2 '06 #14
Greetings.

In article <e0**********@blue.rahul.net>, axlq wrote:
In article <Xn************************@216.234.192.142>,
Stan McCann <me@stanmccann.us> wrote:
A table is entirely appropriate when you want to maintain both a
horizontal and vertical relationship between displayed elements.
That's what it's for.


No, that's not what a table is for. You are thinking layout instead of
semantics.


No, I'm thinking strictly in terms of tabular data, in which you
want to maintain a horizontal and vertical relationship between
displayed elements. As I said, that's what a table is for. We agree
that it's appropriate in this case.


No we don't. A table is a matrix where there is a clear semantic
relationship among each element in a column, and also among each element
in a row. This is not necessarily the case for a matrix of form elements.

Regards,
Tristan

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Apr 3 '06 #15

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

Similar topics

4
by: Sims | last post by:
Hi, This will validate, (http://validator.w3.org/) <form method="POST" action="" name='xForm' style='background:inherit;'> <table style='background:inherit; width:100%;'> <tr width=80%> <td>...
6
by: Amir Hardon | last post by:
I'm new to DOM and can't figure out this thing: I'm trying to add a row to a table with a form field in one of it's cells, but if I'm appending the field to a form it gets out of the table. Can...
8
by: L Major | last post by:
Hi Unfortunately, I am limited to using tables for part of my current project. I have a form that spans across a number of TR and TD in the shape of checkboxes. Doctype is XHTML 1.0...
2
by: Asad | last post by:
I have a form on a page that has several textareas, and textboxes inside a table (so the table containing the textboxes is also inside the FORM tag). I want to replace the textareas with simple...
5
by: brian4cards | last post by:
http://www.igearonline.com/subscribe/admin.asp I have an html table that is loaded with database records. I have edit and delete options inside the table that edit or delete a given row. They...
5
by: Richard Dixson | last post by:
I created a new C# web application. Basically all I am trying to do is create a table that consists of a few rows with two columns in each. And then to set those columns to text values from my...
8
by: tatemononai | last post by:
I had a beautiful script that was running, well, just beautifully. But then I decided to take a button that fired an event and place it inside a <asp:table. The event WILL NOT FIRE INSIDE THE...
2
by: KarlosSultana | last post by:
Hello to those who read this, this is my first ever post! I am currently getting very confused trying to put a <form> in a table-cell: Firstly I have a <div> styled with display:table -this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.