<BR> Tags - is it always necessary to close these tags?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divina11
    New Member
    • Aug 2007
    • 55

    <BR> Tags - is it always necessary to close these tags?

    is it always necessary to close these tags? by using </br>
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    End tags for <br> are forbidden.

    Comment

    • Death Slaught
      Top Contributor
      • Aug 2007
      • 1137

      #3
      Originally posted by drhowarddrfine
      End tags for <br> are forbidden.
      i wouldnt say there forbidden but the <br> is an empty tag it has no end tag so dont use one because </br> isnt a tag at all.

      Comment

      • gregerly
        Recognized Expert New Member
        • Sep 2006
        • 192

        #4
        Originally posted by Death Slaught
        i wouldnt say there forbidden but the <br> is an empty tag it has no end tag so dont use one because </br> isnt a tag at all.
        Why would the break tag not be an HTML tag? It's just an HTML tag with no attributes. An IMG tag follows the same rules as the BR tag, it just has attributes. And if you code in XHTML you will need to close the BR tag, only it's not a seperate tag. It's written as <br />.

        Hope that helps!

        Greg

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          "Forbidden" is the W3C term for tags that are not allowed to have closing tags. Yes, it is called an 'empty tag' and there is no such thing as </ br>.

          <br /> in xhtml is the same thing, an 'empty tag' that is self-closing.

          Comment

          • divina11
            New Member
            • Aug 2007
            • 55

            #6
            Thank you for your explaination too

            Comment

            Working...