Need advice on code

Discussion in 'HTML' started by shapper, Dec 13, 2007.

  1. shapper

    shapper Guest

    Hello,

    I have a page with the following content and using the following tags:

    Title <h1>
    Description <span>
    Text <p>
    Form Header <h2>
    Form <ul> (the form inputs and buttons are
    inside the <li> tags)
    Text <p>

    My question is:
    Is there any reason to put my FormHeader and Form wrapped around
    inside a div?

    Thanks,
    Miguel
     
    shapper, Dec 13, 2007
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed shapper <>
    writing in news:08ec2d96-43df-45cf-888a-a9701a23a436
    @e6g2000prf.googlegroups.com:

    > Hello,
    >
    > I have a page with the following content and using the following tags:
    >
    > Title <h1>
    > Description <span>
    > Text <p>
    > Form Header <h2>
    > Form <ul> (the form inputs and buttons are
    > inside the <li> tags)
    > Text <p>
    >
    > My question is:
    > Is there any reason to put my FormHeader and Form wrapped around
    > inside a div?
    >
    > Thanks,
    > Miguel
    >


    Why are you using this kind of markup? Use the correct element for the
    job:

    <h1>Page Title</h1>
    <p>Use the form to send information.</p>
    <form method="post" action="somescript">
    <fieldset><legend>Form Title</legend>
    <label for="field1">Field1 </label> <input type="text" name="field1"
    id="field1" value="initial value"><br>
    <label for="field2">Field2 </label> <input type="text" name="field2"
    id="field2" value="initial value"><br>
    <input type="submit" value="Submit">
    </fieldset>
    </form>

    Using this kind of markup, you can style the elements any way you wish.


    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Dec 14, 2007
    #2
    1. Advertising

  3. shapper

    DocuMaker Guest

    On Dec 13, 2:37 pm, shapper <> wrote:
    > Hello,
    >
    > I have a page with the following content and using the following tags:
    >
    > Title <h1>
    > Description <span>
    > Text <p>
    > Form Header <h2>
    > Form <ul> (the form inputs and buttons are
    > inside the <li> tags)
    > Text <p>
    >
    > My question is:
    > Is there any reason to put my FormHeader and Form wrapped around
    > inside a div?
    >
    > Thanks,
    > Miguel


    I can't think of a reason since forms automatically break onto a new
    line. Unless forms can accept styles - then no.

    ---
    http://www.outsource2documaker.com
    Managing outsourced projects ranging from fine artwork and business
    graphics to website design and maintenance.
     
    DocuMaker, Dec 14, 2007
    #3
  4. shapper

    Chaddy2222 Guest

    On Dec 14, 6:13 pm, Adrienne Boswell <> wrote:
    > Gazing into my crystal ball I observed shapper <>
    > writing in news:08ec2d96-43df-45cf-888a-a9701a23a436
    > @e6g2000prf.googlegroups.com:
    >
    >
    >
    >
    >
    > > Hello,

    >
    > > I have a page with the following content and using the following tags:

    >
    > > Title <h1>
    > > Description <span>
    > > Text <p>
    > > Form Header <h2>
    > > Form <ul> (the form inputs and buttons are
    > > inside the <li> tags)
    > > Text <p>

    >
    > > My question is:
    > > Is there any reason to put my FormHeader and Form wrapped around
    > > inside a div?

    >
    > > Thanks,
    > > Miguel

    >
    > Why are you using this kind of markup? Use the correct element for the
    > job:
    >
    > <h1>Page Title</h1>
    > <p>Use the form to send information.</p>
    > <form method="post" action="somescript">
    > <fieldset><legend>Form Title</legend>
    > <label for="field1">Field1 </label> <input type="text" name="field1"
    > id="field1" value="initial value"><br>
    > <label for="field2">Field2 </label> <input type="text" name="field2"
    > id="field2" value="initial value"><br>
    > <input type="submit" value="Submit">
    > </fieldset>
    > </form>
    >
    > Using this kind of markup, you can style the elements any way you wish.
    >

    I agree. I really hate sites that use headings just to make a bit of
    text bold, you should really use a style rule for such things.
    --
    Regards Chad. http://freewebdesignonline.org
     
    Chaddy2222, Dec 14, 2007
    #4
  5. DocuMaker wrote:

    > I can't think of a reason since forms automatically break onto a new
    > line. Unless forms can accept styles - then no.


    Of course forms can be styled

    form {
    margin: .5em;
    padding: 1em;
    border: 5px inset #f00;
    color: ##000;
    background-color: #fee;
    }

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Dec 14, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Asun Friere
    Replies:
    1
    Views:
    530
    Paul Boddie
    Aug 27, 2003
  2. Peter Hansen
    Replies:
    23
    Views:
    910
    Anton Vredegoor
    Sep 5, 2003
  3. Gerrit Holl
    Replies:
    16
    Views:
    644
    Tom Plunket
    Aug 29, 2003
  4. Asun Friere
    Replies:
    0
    Views:
    499
    Asun Friere
    Aug 28, 2003
  5. Michele Simionato
    Replies:
    2
    Views:
    408
    Jacek Generowicz
    Sep 1, 2003
Loading...

Share This Page