Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts

    whats the difference between <br> and <br />

    I know it's better to use <br />

    but why exactly is that?

    Edit: I know it's a dumb question, but no one has ever really explained it to me.
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #2
    Regular Coder Ranger56's Avatar
    Join Date
    Mar 2005
    Location
    Kent, WA.
    Posts
    783
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <br /> is just the way to close a <br> tag in XHTML so it is valid.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    The first is from HTML, the second is the XHTML version. Use the second if you're writing XHTML-compliant code. You can even use it in HTML-compliant code without problems, I believe.

  • #4
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah I asked someone online after I posted. I figured it was something like that.
    Thanks!
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #5
    New Coder
    Join Date
    Apr 2005
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    With any tags that don't have a closing tag, you should include a slash. It makes your code easier to read and understand.


  •  

    Posting Permissions

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