If i'm using html 4.01 transitional, will I run into problems if i use <br /> as the break tag instead of <br>?

  • As an aside, why are you using transitional?! This was implemented as a temporary measure to allow developers to easily transition to the then new HTML 4.01 standard from previous versions. That was over a decade ago... danwellman almost 8 years ago
  • I use <br /> as matter of habit, but in this case it's for an email template. I inherited the template in 4.01 transitional and don't know what's dependent on that. So I don't want to change the doctype at the moment, and I'd prefer to keep using <br /> out of habit . . . as long as it won't confuse any browsers or email programs due to the old doctype. robertpateii almost 8 years ago
  • It won't. Doug almost 8 years ago
  • Is there a good reason for using any <br /> tag? I usually avoid them as they don't really have a good semantic meaning. I recommend using <p> or perhaps <pre> for more advanced situations. kainosnous almost 8 years ago

2 answers

Doug 1095
This was chosen as the best answer

You will not have any display or rendering problems at all, but your page will not validate. Validation checks the syntax used in a page against the syntax required by the stated doctype. If you use validation as a way of finding errors or trouble-shooting, this will get in the way.

But Dan Wellman's question above is important. Why did you choose the doctype you did? For that matter why do you want to add the trailing slash to the br element? These two choices are in conflict with each other and hint at a lack of planning or at least a lack of familiarity with the different doctypes and their reasons for existence.

Answered almost 8 years ago by Doug

No. HTML 4 void elements (br, img, input, etc.) do not have the trailing slash. That said, it won't affect the rendering of your page if you use the trailing slash - you just lose a few nerd points.

Answered almost 8 years ago by Tim Hettler