Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Is it a valid structure?

 
Thread Tools Search this Thread
Old 01-21-2004, 06:24 PM   #1
Default Is it a valid structure?


I'm just wondering if this is a valid structure:

<fieldset>
<legend>Please make a choice:</legend>
<ul>
<li><a href="add.php">Add data</a></li>
<li><a href="display.php">Display data</a></li>
<li><a href="edit.php">Edit data</a></li>
</ul>
</fieldset>

Anyone?


Regards,
Samuël van Laere




Samuël van Laere
  Reply With Quote
Old 01-21-2004, 06:47 PM   #2
Woolly Mittens
 
Posts: n/a
Default Re: Is it a valid structure?

"Samuël van Laere" <> wrote in message
news:gtzPb.64127$...
> I'm just wondering if this is a valid structure:


Where's the <form>?


  Reply With Quote
Old 01-21-2004, 08:37 PM   #3
kayodeok
 
Posts: n/a
Default Re: Is it a valid structure?

"Samuël van Laere" <> wrote in news:gtzPb.64127$:

> I'm just wondering if this is a valid structure:
>
> <fieldset>
> <legend>Please make a choice:</legend>
> <ul>
> <li><a href="add.php">Add data</a></li>
> <li><a href="display.php">Display data</a></li>
> <li><a href="edit.php">Edit data</a></li>
> </ul>
> </fieldset>


Strange! But after enclosing with the Form element,
http://www.htmlhelp.com/tools/validator/direct.html
says it is valid.

I don't know what you are trying to achieve so this is my
best guess:

<form action="..." method="post">
<div>
<fieldset>
<legend>Please make a choice:</legend>
<input type="radio" name="data" value="add.php">Add data<br>
<input type="radio" name="data" value="display.php">Display data<br>
<input type="radio" name="data" value="edit.php">Edit data<br>
<input type="submit" value="Send">
</fieldset>
</div>
</form>

--
Kayode Okeyode
http://www.kayodeok.co.uk/weblog/
http://www.kayodeok.btinternet.co.uk.../webdesign.htm
  Reply With Quote
Old 01-21-2004, 09:08 PM   #4
Jukka K. Korpela
 
Posts: n/a
Default Re: Is it a valid structure?

kayodeok <> wrote:

>> <fieldset>
>> <legend>Please make a choice:</legend> <ul>
>> <li><a href="add.php">Add data</a></li>
>> <li><a href="display.php">Display data</a></li>
>> <li><a href="edit.php">Edit data</a></li> </ul> </fieldset>

>
> Strange! But after enclosing with the Form element,
> http://www.htmlhelp.com/tools/validator/direct.html
> says it is valid.


It's not that strange, and it's equally valid without any form element.
Just bear in mind that "valid" only means compliance to some formal
rules, see http://www.cs.tut.fi/~jkorpela/html/validation.html

> I don't know what you are trying to achieve so this is my
> best guess:
>
> <form action="..." method="post">


There's no need to guess, and no need to use a form.

The markup, as given in the original question, has a simple list of
links. That's the best navigational tool ever invented; forms are poor
and confusing surrogates.

But the fieldset markup around it, although valid (remember that this
only means compliance to some formal rules, which _must_ allow a lot of
nonsense in any real application), is rather illogical. There are no
form fields around, and no fields are called for.

If, on the other hand, you really really want the visual appearance of
a fieldset and its legend, as implemented in some particular
browser(s), then such markup is what you need. The appearance cannot be
described in current CSS. Well, you can come pretty close I suppose, by
drawing a border around the <ul> element and by using a negative margin
to position the header-like text to that it appears on top of a segment
of the border. But then it would probably be _too_ close a fieldset
appearance to confuse the user but not close enough to please the
designer!

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


  Reply With Quote
Old 01-21-2004, 09:40 PM   #5
kayodeok
 
Posts: n/a
Default Re: Is it a valid structure?

"Jukka K. Korpela" <> wrote in
news:Xns9477EB25E1381jkorpelacstutfi@193.229.0.31:

>> I don't know what you are trying to achieve so this is my
>> best guess:
>>
>> <form action="..." method="post">

>
> There's no need to guess, and no need to use a form.
>
> The markup, as given in the original question, has a simple list
> of links. That's the best navigational tool ever invented; forms
> are poor and confusing surrogates.
>
> But the fieldset markup around it, although valid (remember that
> this only means compliance to some formal rules, which _must_
> allow a lot of nonsense in any real application), is rather
> illogical. There are no form fields around, and no fields are
> called for.


Thanks for clarifying, I assumed he was designing a form because of
the presence of the the fieldset and legend element.

I didn't try out his code in my browser so it wasn't immediately
obvious to me that the fieldset element happens to look like a border
with rounded corners and that is probably the effect he was trying to
achieve...

--
Kayode Okeyode
http://www.kayodeok.co.uk/weblog/
http://www.kayodeok.btinternet.co.uk.../webdesign.htm
  Reply With Quote
Old 01-21-2004, 11:24 PM   #6
Jukka K. Korpela
 
Posts: n/a
Default Re: Is it a valid structure?

kayodeok <> wrote:

> I didn't try out his code in my browser so it wasn't immediately
> obvious to me that the fieldset element happens to look like a
> border with rounded corners and that is probably the effect he was
> trying to achieve...


The appearance of a fieldset element depends on many things, including
platform. On Win98 for example, IE 6 displays it with a rectangular
border.

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


  Reply With Quote
Old 01-22-2004, 12:23 AM   #7
kayodeok
 
Posts: n/a
Default Re: Is it a valid structure?

"Jukka K. Korpela" <> wrote in
news:Xns9478DF631914jkorpelacstutfi@193.229.0.31:

> kayodeok <> wrote:
>
>> I didn't try out his code in my browser so it wasn't
>> immediately obvious to me that the fieldset element happens to
>> look like a border with rounded corners and that is probably
>> the effect he was trying to achieve...

>
> The appearance of a fieldset element depends on many things,
> including platform. On Win98 for example, IE 6 displays it with
> a rectangular border.
>


I didn't know that, thanks.

--
Kayode Okeyode
http://www.kayodeok.co.uk/weblog/
http://www.kayodeok.btinternet.co.uk.../webdesign.htm
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump