HTML help

Snow Boy

Well-known member
  • Aug 28, 2006
    2,616
    93
    48
    ජිනා Madam's brothel
    <form action="form_action.asp"
    method="get">

    First name:
    <input type="text" name="fname" value="Mickey" />
    <br />
    Last name:
    <input type="text" name="lname" value="Mouse" />
    <br />
    <input type="submit" value="Submit" />



    HI,
    I'm new to html. Please someone tell me why there is an extra / in the above code before the closing tag of input and br tag.

    Thanx in advance
     

    x-pert

    Member
    Jun 13, 2006
    20,952
    77
    0
    Hi Welcome to ElaKiri machang...

    Usually HTML has open and close tags like :
    <open>
    </close>

    But you can use open and close both in the same line. (In line open and close)
    Thats the meaning of doing / >

    By that you close the tag in the same line...
    Ex :
    You replace

    <input type="text" name="fname" value="Mickey" >
    </input>

    by

    <input type="text" name="fname" value="Mickey" />

    (You dont have to type </input> again. Thats the advantage)



    <br /> acts like a keyboard enter (new line character)
    So by using < br/> you force the curser to move to the next line (next row)

    Hope you are satisfied by the answer..
    Feel free to post more problems..

    Its a pleasure to help someone bro...

    Keep posting and I beleive you will enjoy your stay with us... with the biggest On-line community in Sri Lanka...!!!
     
    Last edited:

    x-pert

    Member
    Jun 13, 2006
    20,952
    77
    0
    Snow Boy said:
    Thanks bro.... I'm experimenting PHP not ASP..... Anyway I got the answer......I think it's the same case with PHP ?........

    I'll back with more errors soon.......... :))


    Ithin bung php using num mokatada asp page ekakata submit kalla thiyanne...
    ;)

    Anyway these syntaxes are in xhtml. So you can use it in many ways.

    Anyway... you got the answer ne... :cool:
     
    Last edited:

    shanX

    Active member
  • Oct 4, 2006
    9,944
    2
    38
    Kandy, LK
    rapa said:
    this is not ASP or PHP thing
    it is stand for XHTML
    when your open some tag you must close it
    but input, br, hr ... hasen't close tag.
    that dependency most on Netscape browser
    Hah hah :lol:

    Yeah bro, it got nothing to do with ASP, PHP ...etc

    Its XHTML. In HTML, for some tags such as IMG, BR, INPUT ...etc (eg:<img src="image_address">), a closing tag (eg:</img>) is optional, but not required. In XHTML, these tags have to be coded with a slash, without using a closing tag (eg: <img src="image_address" />). :D

    Anyway, welcome bro ;)