treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Are HR tags bad?

  • This may be a stupid question, but I had someone tell me recently I shouldn't be using them. Are they considered a bad practice?
  • I'm not sure if they're considered bad practice, but I haven't seen them used in a long time. You can do the same thing with CSS by putting a border on the bottom of a section.
  • They aren't necessarily bad practice, the problem with them is that they are near impossible to display properly across all browsers.
  • The hr tag is not bad practice by any means. It is part of the HTML5 spec after all. I thought this explanation on HTML5 Doctor was spot on. http://html5doctor.com/small-hr-element/
  • Agree with poster above about how they render so differently across browsers. I tend to just make a div with a class of HR and style it accordingly, never have an issue with cross browser then.