How to Add a Line With Text in HTML

The HTML "hr" tag lets you add a line in your content page with text above and below the line. The "hr" tag adds a separator between two lines of text. You can add an "hr" tag anywhere in the body of your web page. It's a convenient way to add a line with text without the need to create or add an image.

Instructions

    • 1

      Right-click the HTML file for your web page and select "Open With." Double-click "Notepad" or another third-party editor, if you have one installed on your computer.

    • 2

      Scroll down to the section of your web page content where you want to place the horizontal line. You must place the line somewhere between the opening "<body>" tag and the closing "</body>" tag.

    • 3

      Type "<hr /> text" in your code where "text" is the text you want to display on the page. The text can be one sentence or several sentences.

    • 4

      Press "Ctrl-S" to save your changes. Double-click the HTML file on your computer to see the new line and text in your web page.

Related Searches

References

You May Also Like

Related Ads

View Mobile Site