Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17928
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Is it legitimate to have a continuous TABLE through multiple FORMs? |
| Date | 2019-05-29 19:20 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <4152479.LvFx2qVVIh@PointedEars.de> (permalink) |
| References | (1 earlier) <gid3upFn22bU1@mid.individual.net> <q9rq6e$rf6$2@gioia.aioe.org> <gidbbdFoj8aU1@mid.individual.net> <q9s0vd$1og2$1@gioia.aioe.org> <fohwE.105820$nx7.43783@fx28.iad> |
Richard Damon wrote:
> On 4/25/19 6:08 AM, R.Wieser wrote:
>>> And I just confirmed his question with: "Yes, you should refactor
>>> it to be valid HTML.".
>>
>> And how should he do that please ? Although I gave a suggestion to
>> get rid of the nesting warning, you yourself mentioned its invalid HTML
>> (is it?) to interleave a table and a forms that way ...
>
> I don't have the inclination to find the exact reference in the HTML
> standard, but the areas defined by tags that have a start and end can
> next but not overlap. In general the following is invalid:
>
> <tag1 ><tag2> </tag1> </tag2>
While the conclusion is correct, the explanation leading up to it is close
to gibberish. (“next” is a preposition, not a verb. Things cannot “next”;
they can _be_ next/adjacent _to each other_.)
“<tag1>…</tag1>” is a “tag1” _element_ with (written) start-tag “<tag1>” and
end-tag “</tag1>”.
Elements cannot overlap, i.e. one element cannot end after another element
has been started and not been ended. However, there are element types where
the end-tag is optional; those elements end automatically when the start-tag
of an allowed element that cannot be contained in the first element is
encountered or the end tag of another element type is encountered. Example:
<ul>
<li>foo
<li>bar
</ul>
is a valid HTML fragment because “li” elements cannot be child elements of
“li” elements (only of “ol” or “ul” elements) and the end-tag of “li”
elements is optional.
> There also are rules for what sort of tags are allowed to be nested
> within other tags (for example things like block structure rules),
> sometimes with broad rules, and sometimes very specific rules (like what
> is allowed directly inside a <table> tag).
There are no “block structure rules”.
The rules are instead about which element _types_ may contain which other
element _types_. The rules are defined by a HTML DTD or the prose of the
HTML specification.
<https://validator.w3.org/>
<https://www.w3.org/TR/html>
> My first guess is that the table is being used to create page structure,
> which was a common technique in years past, but be declared obsolete.
By whom?
> Tables are now supposed to be used only for data that is semantically a
> table,
This does apply to most forms where you have a label, which is the heading,
and you have a form control, which is the data associated with that heading.
> not just having a visual structure of rows and columns (there is
> a distinction between semantic markup and presentation markup).
Yes, but it is proper and semantic markup to use tables in forms as long as
they are serializable. Using a “table” element has the advantage that it
works everywhere, even in a text browser, and CSS can be used so that tables
are displayed differently depending on the available viewport size.
The problem posted in the Subject (which does not have anything to do with
PHP) can be solved by not having several “form” elements where each form
contains a table of controls, but one “form“ element which may contain
several tables. Note that having one large table is usually rendered more
slowly than having several tables that are just styled the same way.
--
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is it legitimate to have a continuous TABLE through multiple FORMs? Dan Campbell <dcwhatthe@gmail.com> - 2019-04-24 07:30 -0700
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-25 08:55 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-25 10:12 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-25 11:01 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-25 12:08 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-25 13:59 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-25 16:13 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-25 16:56 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Richard Damon <Richard@Damon-Family.org> - 2019-04-25 08:05 -0400
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-26 10:53 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 11:14 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-26 11:59 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 12:08 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-05-29 19:20 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-25 09:49 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-25 11:06 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-25 14:09 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Dan Campbell <dcwhatthe@gmail.com> - 2019-04-25 05:32 -0700
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-26 11:20 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 11:31 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-26 11:09 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 11:20 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 11:24 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "R.Wieser" <address@not.available> - 2019-04-26 12:31 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 13:34 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Arno Welzel <usenet@arnowelzel.de> - 2019-04-26 13:36 +0200
Re: Is it legitimate to have a continuous TABLE through multiple FORMs? "J.O. Aho" <user@example.net> - 2019-04-25 21:36 +0200
csiph-web