SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: XTML samples

  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up XTML samples

    hi
    i m new to it.
    can i have some samples of it like forms in XHTML or some thing else with java sceipt interaction and wht restrictions r?
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Forms in XHTML work the same way as they do in HTML 4.0. Nothing new except the stricter rules for well-formedness that any XML language is required to work with.

  3. #3
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Valid HTML 4.0
    HTML Code:
    <FORM action="post.php" method="post">
    <P>
    <input type="submit" value="submit">
    </P>
    </FORM>
    XHTML 1.0
    HTML Code:
    <form action="post.php" method="post">
    <p>
    <input type="submit" value="submit" />
    </p>
    </form>
    There are a couple of differences.

    Check this out: http://www.w3schools.com

    edit: Fixed my mistakes
    Last edited by maxor; Mar 13, 2005 at 12:40.

  4. #4
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maxor
    XHTML 1.0
    <form action="post.php" method="post">
    <input type="submit" value="submit" />
    </form>

    Actually that code will not pass xhtml1.0 strict .... any input MUST be contained by a block level element so any of these would work:

    <div>
    <input type="submit" value="submit" />
    </div>

    <p>
    <input type="submit" value="submit" />
    </p>

    (just a quick example)

  5. #5
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good catch, I was kinda just doing something with a form, but you're right.

  6. #6
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no problem ...... just keeping you honest!

    Im usually not the "self promoting" type but if you want an example that I KNOW is xhtml 1.0 strict look at the contact form(s) on either my design site or my hosting site (hint: they are both in my siggie!) .... its really not that hard to do and using CSS you can really make your form look and act snappy!

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually that code will not pass xhtml1.0 strict .... any input MUST be contained by a block level element
    The same applies for HTML4 Strict.
    Simon Pieters


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •