1. Home
  2. Computing & Technology
  3. Web Design / HTML

Adding Horizontal Lines

Using the HR Tag

By Jennifer Kyrnin, About.com

Sometimes all you need to accent your HTML is a line across the page. To do this, you use the horizontal line tag:

<hr />.

While there are several deprecated attributes of the <hr/> tag, it is recommended that you avoid them and use CSS to style your lines. The advantage to using style sheets is that you can do so much more than just change the width or height of your lines.

<hr style="height:1.5em;width:25em;border:1px solid #000;" />

More about the <hr/> tag

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. Beginning HTML Tutorials
  6. Adding Horizontal Lines - HR - Horizontal Rules

©2008 About.com, a part of The New York Times Company.

All rights reserved.