Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Converting transitional to strict

Reply
Thread Tools

Re: Converting transitional to strict

 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      05-16-2010
Alfred Molon wrote:

> I was trying to convert the pages from my site from transitional to
> strict and ran into problems.
>
> Here is the original transitional page:
> http://www.molon.de/l/upsgn.html
> and here is my attempt:
> http://www.molon.de/l/upsgn1.html
>
> A validator check shows 12 errors. BTW, INPUT elements are not allowed
> anymore in HTML 4?


Yes, of course they are. See the actual error message:
"document type does not allow element "INPUT" here; missing one of "P",
"H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag"

Your <input>s are floating free within <td>s - rather than one of the
above. They need to be direct descendants of one of those.

I think you also have mis-level form tags as well. e.g. the <form> and
the </form> are somehow not inside the same <td>. With all those
myriads of nested tables, it is very hard to follow so I will let that
up to you. Looks like you have tables five-deep? Maintenance nightmare.

> I'm not an HTML expert and I was wondering if perhaps some
> translators/converters exist, which convert transitional code into
> strict code. Any ideas?


Sorry, can't help with that. I've been writing Strict for so long I
wouldn't know where to look, 'cept Google...

--
-bts
-Four wheels carry the body; two wheels move the soul
 
Reply With Quote
 
 
 
 
Rob W.
Guest
Posts: n/a
 
      05-16-2010
Op 16-5-2010 16:23, Alfred Molon schreef:
> In article<hsosua$u58$>, Beauregard T.
> Shagnasty says...
>>
>> I think you also have mis-level form tags as well. e.g. the<form> and
>> the</form> are somehow not inside the same<td>. With all those
>> myriads of nested tables, it is very hard to follow so I will let that
>> up to you.

>
> Well, it's a form and a table is the simplest way to adjust the layout.



Seems like a table is not the simplest way to house a div-encapsulated
form with another table next to it.

--
Rob




 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-16-2010
Alfred Molon wrote:

>> Your <input>s are floating free within <td>s - rather than one of the
>> above. They need to be direct descendants of one of those.

[...]
> Well, it's a form and a table is the simplest way to adjust the
> layout.


There's nothing wrong with structuring a form as table, typically with
labels in one column and corresponding fields in another, and there's
nothing wrong in letting that create a tabular layout.

The statement about <input>s floating free within <td>s is misleading. There
is nothing wrong with <td><input ...></td> as such. A <form> element may
contain a <table> which must contain a <tr> which may contain a <td> which
may contain an <input>. No reason to introduce a block level container,
since <table> is such a container.

However, e.g. the following is a syntax error, in _any_ version of HTML:

<div style="margin: 5px;">
<form method="post" action="gbwrite.php">
</div>

When you start a <form> element within a <div> element, you must end (close)
it there, too.

>> Looks like you have tables five-deep? Maintenance nightmare.

>
> But this page is never changed, no need to maintain it.


So why are you rewriting it? "There is always someone who rewrites working
code, to clean it up or to speed it up." And this saying about programming
applies to HTML authoring as well, with the same ironic tone. (Quite often,
the result is neither cleaner nor faster, but bugs are introduced, as usual
in code modifications.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-17-2010
Ben C wrote:

> As for converting pages to strict doctypes, that may be worth doing so
> as to avoid browser quirks modes and thus increase the probability
> results will look closer in browsers you haven't tested in.


If a page has been designed loosely, the odds are that it relies on "quirks"
mode, so converting it to something that triggers "standards" mode might be
particularly counter-productive.

However, if you wish to enhance an existing page e.g. by using CSS features
that aren't supported by IE in "quirks" mode (there are loads of such
features), then you might consider changing your DOCTYPE. But only after
checking that the page, with no enhancements, really works in "standards"
mode.

Using Strict syntax is quite immaterial here. What matters is the DOCTYPE
declaration, at the string level, as a "magic string" that triggers "quirks"
or "standards" mode - quite independently of actual conformance to the
declared document type definition.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Converting transitional to strict Jukka K. Korpela HTML 65 06-05-2010 10:43 AM
Re: Converting transitional to strict GTalbot HTML 0 05-20-2010 04:26 AM
Re: Converting transitional to strict dorayme HTML 1 05-18-2010 11:12 PM
Re: Converting transitional to strict Neredbojias HTML 1 05-16-2010 07:32 PM
Re: Converting transitional to strict Adrienne Boswell HTML 1 05-16-2010 06:37 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57