<br />

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ahlala

    <br />

    Hello,

    Why are there sometimes tags written like this:

    <br />

    instead of the normal:

    <br>

    What is the reason of the extra "/" ?

    Thank you.
  • ahlala

    #2
    Re: &lt;br /&gt;

    brucie wrote:
    [color=blue]
    > Empty elements must either have an end tag or the start tag must end
    > with />.[/color]

    Thank you!

    Comment

    • brucie

      #3
      Re: &lt;br /&gt;

      in post <news:3fd67763$ 0$5483$ba620e4c @reader3.news.s kynet.be>
      ahlala said:
      [color=blue]
      > Why are there sometimes tags written like this:
      > <br />[/color]

      XHTML

      <quote>
      Empty elements must either have an end tag or the start tag must end
      with />. For instance, <br/> or <hr></hr>. See HTML Compatibility
      Guidelines for information on ways to ensure this is backward compatible
      with HTML 4 user agents.
      </quote> http://www.w3.org/TR/xhtml1/#h-4.6

      --
      brucie
      10/December/2003 11:31:46 am kilo

      Comment

      • Anne van Kesteren

        #4
        Re: &lt;br /&gt;

        ahlala wrote:[color=blue]
        > brucie wrote:
        >
        >[color=green]
        >>Empty elements must either have an end tag or the start tag must end
        >>with />.[/color]
        >
        >
        > Thank you!
        >[/color]
        That is only in XHTML! For HTML is it perfectly valid to have <br>

        --
        Anne van Kesteren
        <http://www.annevankest eren.nl/>

        Comment

        • CJM

          #5
          Re: &lt;br /&gt;

          Anne,

          If you check Brucie's post again, you'll see he does explicitly mention
          XHTML.

          CJM


          Comment

          Working...