Treehouse: Grow your CSS skills. Land your dream job.

Are HR tags bad?

  • # August 30, 2010 at 9:42 am

    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?

    # August 30, 2010 at 10:56 am

    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.

    # August 30, 2010 at 1:08 pm

    They aren’t necessarily bad practice, the problem with them is that they are near impossible to display properly across all browsers.

    # August 31, 2010 at 12:21 am

    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.

    # August 31, 2010 at 6:29 am

    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.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.