Jump to content


Photo

<br> or <br />?


  • Please log in to reply
3 replies to this topic

#1 yoursurrogategod

yoursurrogategod

    Advanced Member

  • Members
  • PipPipPip
  • 179 posts

Posted 25 February 2013 - 02:07 PM

When would you use one as opposed to the other? Aren't they the same?

#2 shlumph

shlumph

    Advanced Member

  • Members
  • PipPipPip
  • 576 posts
  • LocationNew Hampshire

Posted 25 February 2013 - 02:08 PM

Depends on your doctype. Generally, XHTML requires every tag to be closed, and HTML does not.
whether you think you can, or can't, you're right -HF
Visit my website or github

#3 Love2c0de

Love2c0de

    Advanced Member

  • Members
  • PipPipPip
  • 365 posts
  • LocationThe Pleiades
  • Age:23

Posted 25 February 2013 - 04:05 PM

I've coded in XHTML since 2010 and close all self-closing tags, like <br />, <hr />, <img />, <link />K

Kind regards,

L2c.

#4 haku

haku

    Advanced Member

  • Staff Alumni
  • 6,172 posts

Posted 03 March 2013 - 09:12 PM

XHTML requires the closing slash: <br />
HTML4 does not require it, and all the following valid: <br> <br/> <br />




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com